From 21fa0ee7a70654efd5469612970ca586c22fcfe8 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Mon, 24 Jun 2024 14:47:29 +0530 Subject: [PATCH] On email verification page --- web/packages/accounts/pages/verify.tsx | 37 +++++++++++++++++--------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/web/packages/accounts/pages/verify.tsx b/web/packages/accounts/pages/verify.tsx index c6e6954d12..2217f30298 100644 --- a/web/packages/accounts/pages/verify.tsx +++ b/web/packages/accounts/pages/verify.tsx @@ -1,3 +1,4 @@ +import { customAPIHost } from "@/next/origins"; import { ensure } from "@/utils/ensure"; import type { UserVerificationResponse } from "@ente/accounts/types/user"; import { VerticallyCentered } from "@ente/shared/components/Container"; @@ -20,7 +21,7 @@ import { } from "@ente/shared/storage/localStorage/helpers"; import { clearKeys } from "@ente/shared/storage/sessionStorage"; import type { KeyAttributes, User } from "@ente/shared/user/types"; -import { Box, Typography } from "@mui/material"; +import { Box, Stack, Typography } from "@mui/material"; import { HttpStatusCode } from "axios"; import { t } from "i18next"; import { useRouter } from "next/router"; @@ -164,6 +165,8 @@ const Page: React.FC = ({ appContext }) => { setTimeout(() => setResend(0), 3000); }; + const host = customAPIHost(); + if (!email) { return ( @@ -225,17 +228,27 @@ const Page: React.FC = ({ appContext }) => { callback={onSubmit} /> - - {resend === 0 && ( - - {t("RESEND_MAIL")} - - )} - {resend === 1 && {t("SENDING")}} - {resend === 2 && {t("SENT")}} - - {t("CHANGE_EMAIL")} - + + + + {resend === 0 && ( + + {t("RESEND_MAIL")} + + )} + {resend === 1 && {t("SENDING")}} + {resend === 2 && {t("SENT")}} + + {t("CHANGE_EMAIL")} + + + + {host && ( + + {host} + + )} +