diff --git a/public/locales/en-US/translation.json b/public/locales/en-US/translation.json index 087d829..2c68792 100644 --- a/public/locales/en-US/translation.json +++ b/public/locales/en-US/translation.json @@ -26,19 +26,6 @@ "title": "Overview", "description": "Not much to see here, yet." }, - "SignupRoute": { - "forms": { - "mailVerification": { - "title": "You got mail!", - "description": "We sent you an email with a link to confirm your email address. Please check your inbox and click on the link to continue.", - "editEmail": { - "title": "Edit email address?", - "description": "Would you like to return to the previous step and edit your email address?", - "continueAction": "Yes, edit email" - } - } - } - }, "VerifyEmailRoute": { "title": "Verify your email", "isLoading": "Verifying your email...", diff --git a/public/locales/en-US/verify-email.json b/public/locales/en-US/verify-email.json new file mode 100644 index 0000000..98a10ef --- /dev/null +++ b/public/locales/en-US/verify-email.json @@ -0,0 +1,7 @@ +{ + "title": "Verify your email", + "isLoading": "We are verifying your email address...", + "errors": { + "invalid": "The verification link is invalid or has expired." + } +} diff --git a/src/routes/VerifyEmailRoute.tsx b/src/routes/VerifyEmailRoute.tsx index 5641ecc..7c28982 100644 --- a/src/routes/VerifyEmailRoute.tsx +++ b/src/routes/VerifyEmailRoute.tsx @@ -17,9 +17,9 @@ import {AuthContext} from "~/components" const emailSchema = yup.string().email() export default function VerifyEmailRoute(): ReactElement { + const {t} = useTranslation("verify-email") const theme = useTheme() const navigate = useNavigate() - const {t} = useTranslation() const {login} = useContext(AuthContext) const [_, setEmail] = useLocalStorage("signup-form-state-email", "") @@ -32,7 +32,7 @@ export default function VerifyEmailRoute(): ReactElement { const tokenSchema = yup .string() .length(serverSettings.emailVerificationLength) - .test("token", t("routes.VerifyEmailRoute.errors.code.invalid") as string, token => { + .test("token", t("errors.invalid") as string, token => { if (!token) { return false } @@ -69,13 +69,13 @@ export default function VerifyEmailRoute(): ReactElement { > - {t("routes.VerifyEmailRoute.title")} + {t("title")} {loading ? ( - {t("routes.VerifyEmailRoute.isLoading")} + {t("isLoading")} ) : ( @@ -85,7 +85,7 @@ export default function VerifyEmailRoute(): ReactElement { - {t("routes.VerifyEmailRoute.isCodeInvalid")} + {t("errors.invalid")}