This commit is contained in:
Manav Rathi 2024-05-26 18:22:07 +05:30
parent d3d3e4dbed
commit b99c573d3a
No known key found for this signature in database
2 changed files with 12 additions and 5 deletions

View file

@ -30,7 +30,9 @@ const bip39 = require("bip39");
bip39.setDefaultWordlist("english");
const Page: React.FC<PageProps> = ({ appContext }) => {
const appNameOld = appNameToAppNameOld(appContext.appName);
const { appName } = appContext;
const appNameOld = appNameToAppNameOld(appName);
const [keyAttributes, setKeyAttributes] = useState<
KeyAttributes | undefined

View file

@ -1,5 +1,6 @@
import { ensure } from "@/utils/ensure";
import type { UserVerificationResponse } from "@ente/accounts/types/user";
import { appNameToAppNameOld } from "@ente/shared/apps/constants";
import type { PageProps } from "@ente/shared/apps/types";
import { VerticallyCentered } from "@ente/shared/components/Container";
import EnteSpinner from "@ente/shared/components/EnteSpinner";
@ -32,8 +33,10 @@ import { PAGES } from "../constants/pages";
import { configureSRP } from "../services/srp";
import type { SRPSetupAttributes } from "../types/srp";
export default function VerifyPage({ appContext, appName }: PageProps) {
const { logout } = appContext;
const Page: React.FC<PageProps> = ({ appContext }) => {
const { appName, logout } = appContext;
const appNameOld = appNameToAppNameOld(appName);
const [email, setEmail] = useState("");
const [resend, setResend] = useState(0);
@ -148,7 +151,7 @@ export default function VerifyPage({ appContext, appName }: PageProps) {
const resendEmail = async () => {
setResend(1);
await sendOtt(appName, email);
await sendOtt(appNameOld, email);
setResend(2);
setTimeout(() => setResend(0), 3000);
};
@ -199,4 +202,6 @@ export default function VerifyPage({ appContext, appName }: PageProps) {
</FormPaper>
</VerticallyCentered>
);
}
};
export default Page;