From 38b869084d31f3a4b41ab7207a3bb02987507121 Mon Sep 17 00:00:00 2001 From: ariari04 Date: Thu, 22 Aug 2024 16:49:35 +0600 Subject: [PATCH] Add confirm email page --- messages/en.json | 9 ++ messages/kg.json | 9 ++ messages/ru.json | 9 ++ .../[locale]/sign-up/confirm-email/page.tsx | 6 +- src/widgets/Footer/Footer.tsx | 2 +- src/widgets/Navbar/Navbar.tsx | 4 +- .../ConfirmEmailForm.module.scss | 140 ------------------ .../ConfirmEmailForm/ConfirmEmailForm.tsx | 71 +++++---- 8 files changed, 78 insertions(+), 172 deletions(-) delete mode 100644 src/widgets/forms/ConfirmEmailForm/ConfirmEmailForm.module.scss diff --git a/messages/en.json b/messages/en.json index 3dcb2a1..0c36e48 100644 --- a/messages/en.json +++ b/messages/en.json @@ -61,5 +61,14 @@ }, "rights": { "text": "All rights reserved" + }, + "confirmEmail": { + "checkEmail": "Check your email", + "codeSent": "We sent the code by email", + "code": "Confirmation code", + "submitBtn": "Submit", + "resendIn": "Resend code via", + "resendBtn": "Resend code", + "error": "An error occurred" } } diff --git a/messages/kg.json b/messages/kg.json index e7b9cc5..8ae2963 100644 --- a/messages/kg.json +++ b/messages/kg.json @@ -61,5 +61,14 @@ }, "rights": { "text": "Бардык укуктар корголгон" + }, + "confirmEmail": { + "checkEmail": "Электрондук почтаңызды текшериңиз", + "codeSent": "Кодду электрондук почта аркылуу жөнөттүк", + "code": "Ырастоо коду", + "submitBtn": "Тапшыруу", + "resendIn": "Кодду кайра жөнөтүү", + "resendBtn": "Кодду кайра жөнөтүү", + "error": "Ката кетти" } } diff --git a/messages/ru.json b/messages/ru.json index d43a270..127c3b4 100644 --- a/messages/ru.json +++ b/messages/ru.json @@ -62,5 +62,14 @@ }, "rights": { "text": "Все права защищены" + }, + "confirmEmail": { + "checkEmail": "Проверьте свою почту", + "codeSent": "Мы отправили код на почту", + "code": "Код подтверждения", + "submitBtn": "Подтвердить", + "resendIn": "Отправить код повторно через", + "resendBtn": "Отправить код повторно", + "error": "Произошла ошибка" } } diff --git a/src/app/[locale]/sign-up/confirm-email/page.tsx b/src/app/[locale]/sign-up/confirm-email/page.tsx index 9d58e8d..03d0209 100644 --- a/src/app/[locale]/sign-up/confirm-email/page.tsx +++ b/src/app/[locale]/sign-up/confirm-email/page.tsx @@ -1,6 +1,7 @@ import Image from "next/image"; import mail from "./icons/mail.svg"; import ConfirmEmailForm from "@/widgets/forms/ConfirmEmailForm/ConfirmEmailForm"; +import { useTranslations } from "next-intl"; const ConfirmEmail = ({ searchParams, @@ -9,6 +10,7 @@ const ConfirmEmail = ({ email: string; }; }) => { + const t = useTranslations("confirmEmail"); return (
@@ -18,10 +20,10 @@ const ConfirmEmail = ({

- Проверьте свою почту + {t("checkEmail")}

- Мы отправили код на почту {searchParams.email} + {t("codeSent")} {searchParams.email}

diff --git a/src/widgets/Footer/Footer.tsx b/src/widgets/Footer/Footer.tsx index 3e944c7..ab023d1 100644 --- a/src/widgets/Footer/Footer.tsx +++ b/src/widgets/Footer/Footer.tsx @@ -18,7 +18,7 @@ const Footer = () => {

© {tRights("text")}

{tDisclaimer("text")}

-
+

{t("navigation")}

diff --git a/src/widgets/Navbar/Navbar.tsx b/src/widgets/Navbar/Navbar.tsx index e80bc10..253093e 100644 --- a/src/widgets/Navbar/Navbar.tsx +++ b/src/widgets/Navbar/Navbar.tsx @@ -44,11 +44,11 @@ const Navbar = () => { />
-