|
|
@@ -14,8 +14,8 @@ import type { InferResponseType } from 'hono/client';
|
|
|
type FileType = InferResponseType<typeof fileClient.$get, 200>['data'][0]
|
|
|
|
|
|
interface AvatarSelectorProps {
|
|
|
- value?: number;
|
|
|
- onChange: (fileId: number) => void;
|
|
|
+ value?: number | null;
|
|
|
+ onChange: (fileId: number | null) => void;
|
|
|
accept?: string;
|
|
|
maxSize?: number;
|
|
|
uploadPath?: string;
|
|
|
@@ -122,7 +122,7 @@ const AvatarSelector: React.FC<AvatarSelectorProps> = ({
|
|
|
|
|
|
const handleRemoveAvatar = (e: React.MouseEvent) => {
|
|
|
e.stopPropagation();
|
|
|
- onChange(0);
|
|
|
+ onChange(null as any);
|
|
|
};
|
|
|
|
|
|
return (
|