small updates

This commit is contained in:
Ren Amamiya
2023-09-05 08:50:13 +07:00
parent 57c17ffbf9
commit 4019623d99
12 changed files with 343 additions and 280 deletions
+2 -4
View File
@@ -7,9 +7,7 @@ import { useImageUploader } from '@utils/hooks/useUploader';
export function BannerUploader({
setBanner,
}: {
setBanner: Dispatch<
SetStateAction<{ url: undefined | string; error?: undefined | string }>
>;
setBanner: Dispatch<SetStateAction<string>>;
}) {
const upload = useImageUploader();
const [loading, setLoading] = useState(false);
@@ -18,7 +16,7 @@ export function BannerUploader({
setLoading(true);
const image = await upload(null);
if (image.url) {
setBanner(image);
setBanner(image.url);
}
setLoading(false);
};