Direct
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
import Page_ from "@/accounts/pages/two-factor/recover";
|
||||
import { useAppContext } from "types/context";
|
||||
|
||||
const Page = () => (
|
||||
<Page_ appContext={useAppContext()} twoFactorType="passkey" />
|
||||
);
|
||||
const Page = () => <Page_ twoFactorType="passkey" />;
|
||||
|
||||
export default Page;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import Page_ from "@/accounts/pages/two-factor/recover";
|
||||
import { useAppContext } from "types/context";
|
||||
|
||||
const Page = () => <Page_ appContext={useAppContext()} twoFactorType="totp" />;
|
||||
const Page = () => <Page_ twoFactorType="totp" />;
|
||||
|
||||
export default Page;
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import Page_ from "@/accounts/pages/two-factor/recover";
|
||||
import { useAppContext } from "@/new/photos/types/context";
|
||||
|
||||
const Page = () => (
|
||||
<Page_ appContext={useAppContext()} twoFactorType="passkey" />
|
||||
);
|
||||
const Page = () => <Page_ twoFactorType="passkey" />;
|
||||
|
||||
export default Page;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import Page_ from "@/accounts/pages/two-factor/recover";
|
||||
import { useAppContext } from "@/new/photos/types/context";
|
||||
|
||||
const Page = () => <Page_ appContext={useAppContext()} twoFactorType="totp" />;
|
||||
const Page = () => <Page_ twoFactorType="totp" />;
|
||||
|
||||
export default Page;
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
import React from "react";
|
||||
import type { PageProps } from "../../types/page";
|
||||
import TwoFactorRecoverPage from "../two-factor/recover";
|
||||
import Page_ from "../two-factor/recover";
|
||||
|
||||
const Page: React.FC<PageProps> = ({ appContext }) => (
|
||||
<TwoFactorRecoverPage appContext={appContext} twoFactorType="passkey" />
|
||||
);
|
||||
const Page = () => <Page_ twoFactorType="passkey" />;
|
||||
|
||||
export default Page;
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
} from "@/accounts/services/user";
|
||||
import { LinkButton } from "@/base/components/LinkButton";
|
||||
import type { MiniDialogAttributes } from "@/base/components/MiniDialog";
|
||||
import type { BaseContextT } from "@/base/context";
|
||||
import { useBaseContext } from "@/base/context";
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import type { B64EncryptionResult } from "@/base/crypto/libsodium";
|
||||
import log from "@/base/log";
|
||||
@@ -38,12 +38,11 @@ const bip39 = require("bip39");
|
||||
bip39.setDefaultWordlist("english");
|
||||
|
||||
export interface RecoverPageProps {
|
||||
appContext: BaseContextT;
|
||||
twoFactorType: TwoFactorType;
|
||||
}
|
||||
|
||||
const Page: React.FC<RecoverPageProps> = ({ appContext, twoFactorType }) => {
|
||||
const { logout, showMiniDialog } = appContext;
|
||||
const Page: React.FC<RecoverPageProps> = ({ twoFactorType }) => {
|
||||
const { logout, showMiniDialog } = useBaseContext();
|
||||
|
||||
const [encryptedTwoFactorSecret, setEncryptedTwoFactorSecret] =
|
||||
useState<Omit<B64EncryptionResult, "key"> | null>(null);
|
||||
|
||||
Reference in New Issue
Block a user