1616import STGeneralError from "supertokens-web-js/utils/error" ;
1717
1818import { withOverride } from "../../../../../components/componentOverride/withOverride" ;
19- // import { useUserContext } from "../../../../../usercontext";
19+ import { useTranslation } from "../../../../../translation/translationContext" ;
20+ import { Label } from "../../../../emailpassword/components/library" ;
2021import FormBase from "../../../../emailpassword/components/library/formBase" ;
21- import { defaultValidate } from "../../../../emailpassword/validators" ;
22+ import { defaultEmailValidator } from "../../../../emailpassword/validators" ;
2223
2324import type { SignUpFormProps } from "../../../types" ;
2425
@@ -29,7 +30,7 @@ export const SignUpForm = withOverride(
2930 footer ?: JSX . Element ;
3031 }
3132 ) : JSX . Element {
32- // const userContext = useUserContext ();
33+ const t = useTranslation ( ) ;
3334
3435 return (
3536 < FormBase
@@ -39,13 +40,23 @@ export const SignUpForm = withOverride(
3940 formFields = { [
4041 {
4142 id : "email" ,
42- label : "WEBAUTHN_SIGN_UP_LABEL" ,
43+ label : "" ,
44+ labelComponent : (
45+ < div data-supertokens = "formLabelWithLinkWrapper" >
46+ < Label value = { "WEBAUTHN_SIGN_UP_LABEL" } data-supertokens = "emailInputLabel" />
47+ < a
48+ onClick = { ( ) => alert ( "That is not defined yet!" ) }
49+ data-supertokens = "link linkButton formLabelLinkBtn recoverAccountTrigger" >
50+ { t ( "WEBAUTHN_RECOVER_ACCOUNT_LABEL" ) }
51+ </ a >
52+ </ div >
53+ ) ,
4354 optional : false ,
4455 autofocus : true ,
4556 placeholder : "" ,
4657 autoComplete : "email" ,
4758 // We are using the default validator that allows any string
48- validate : defaultValidate ,
59+ validate : defaultEmailValidator ,
4960 } ,
5061 ] }
5162 buttonLabel = { "WEBAUTHN_EMAIL_CONTINUE_BUTTON" }
0 commit comments