diff --git a/docs/src/app/[locale]/mykey/Form.tsx b/docs/src/app/[locale]/mykey/Form.tsx new file mode 100644 index 0000000..03d242d --- /dev/null +++ b/docs/src/app/[locale]/mykey/Form.tsx @@ -0,0 +1,176 @@ +"use client"; + +import { useFormState, useFormStatus } from "react-dom"; + +const initialState = { + message: "", +}; + +export default function MyKeyForm({ + translateLocal, +}: Readonly<{ + translateLocal: ( + prevState: any, + formData: FormData, + ) => Promise<{ + message: string; + }>; +}>) { + const [state, formAction] = useFormState(translateLocal, initialState); + + return ( +
+
+ + +
+
+ + +
+
+ + +
+ +
+ + + + + + +
+ +
+ +