next.js
90cd4e06 - examples(with-supabase): fix action type error (#72783)

Commit
1 year ago
examples(with-supabase): fix action type error (#72783) ## Why? There is a type issue with one of the form actions. ``` app/(auth-pages)/sign-up/page.tsx:42:25 - error TS2322: Type '(formData: FormData) => Promise<{ error: string; }>' is not assignable to type 'string | ((formData: FormData) => void | Promise<void>) | undefined'. Type '(formData: FormData) => Promise<{ error: string; }>' is not assignable to type '(formData: FormData) => void | Promise<void>'. Type 'Promise<{ error: string; }>' is not assignable to type 'void | Promise<void>'. Type 'Promise<{ error: string; }>' is not assignable to type 'Promise<void>'. Type '{ error: string; }' is not assignable to type 'void'. 42 <SubmitButton formAction={signUpAction} pendingText="Signing up..."> ``` - x-ref: https://github.com/vercel/next.js/discussions/72778
Author
Parents
Loading