diff --git a/src/auth/SignInForm.tsx b/src/auth/SignInForm.tsx index 9ef0cc39..a8e717bd 100644 --- a/src/auth/SignInForm.tsx +++ b/src/auth/SignInForm.tsx @@ -40,6 +40,7 @@ export default function SignInForm() { id="email" inputRef={emailRef} label="Admin Email" + type="email" value={email} onChange={setEmail} readOnly={isSigningIn} diff --git a/src/components/FieldSetWithStatus.tsx b/src/components/FieldSetWithStatus.tsx index dcac825c..affe5150 100644 --- a/src/components/FieldSetWithStatus.tsx +++ b/src/components/FieldSetWithStatus.tsx @@ -27,7 +27,7 @@ export default function FieldSetWithStatus({ loading?: boolean required?: boolean readOnly?: boolean - type?: 'text' | 'password' | 'checkbox' + type?: 'text' | 'email' | 'password' | 'checkbox' inputRef?: LegacyRef }) { const { pending } = useFormStatus(); diff --git a/src/components/ImageInput.tsx b/src/components/ImageInput.tsx index b6637839..13320cb1 100644 --- a/src/components/ImageInput.tsx +++ b/src/components/ImageInput.tsx @@ -70,7 +70,10 @@ export default function ImageInput({ const extension = file?.name.split('.').pop()?.toLowerCase(); const canvas = ref.current; if (file) { - if (maxSize && canvas) { + if (!(maxSize && canvas)) { + // No need to process + onBlobReady?.(file); + } else { // Process images that need resizing const image = await blobToImage(file); setImage(image); @@ -108,9 +111,6 @@ export default function ImageInput({ 'image/jpeg', quality, ); - } else { - // No need to process - onBlobReady?.(file); } } }}