verify
This commit is contained in:
parent
d3d3e4dbed
commit
b99c573d3a
2 changed files with 12 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue