diff --git a/website/src/components/color-extractor.tsx b/website/src/components/color-extractor.tsx index c30ec0b..c9810e4 100644 --- a/website/src/components/color-extractor.tsx +++ b/website/src/components/color-extractor.tsx @@ -69,11 +69,11 @@ export function ColorExtractor () { } const processFiles = async (formData: FormData) => { + setIsLoading(true) const res = await fetch('/api/', { method: 'POST', body: formData }) - setColors(await res.json()) if (!imageUrl) setImageUrl(await getBase64(formData.get('file') as File)) setIsLoading(false) @@ -130,25 +130,21 @@ export function ColorExtractor () { )} ) : ( -