Refactor
This commit is contained in:
parent
19a104374d
commit
e836ada0d6
24 changed files with 91 additions and 115 deletions
8
web/apps/photos/src/pages/change-email.tsx
Normal file
8
web/apps/photos/src/pages/change-email.tsx
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { ensure } from "@/utils/ensure";
|
||||
import Page_ from "@ente/accounts/pages/change-email";
|
||||
import { useContext } from "react";
|
||||
import { AppContext } from "./_app";
|
||||
|
||||
const Page = () => <Page_ appContext={ensure(useContext(AppContext))} />;
|
||||
|
||||
export default Page;
|
|
@ -1,9 +0,0 @@
|
|||
import ChangeEmailPage from "@ente/accounts/pages/change-email";
|
||||
import { APPS } from "@ente/shared/apps/constants";
|
||||
import { AppContext } from "pages/_app";
|
||||
import { useContext } from "react";
|
||||
|
||||
export default function ChangeEmail() {
|
||||
const appContext = useContext(AppContext);
|
||||
return <ChangeEmailPage appContext={appContext} appName={APPS.PHOTOS} />;
|
||||
}
|
8
web/apps/photos/src/pages/change-password.tsx
Normal file
8
web/apps/photos/src/pages/change-password.tsx
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { ensure } from "@/utils/ensure";
|
||||
import Page_ from "@ente/accounts/pages/change-password";
|
||||
import { useContext } from "react";
|
||||
import { AppContext } from "./_app";
|
||||
|
||||
const Page = () => <Page_ appContext={ensure(useContext(AppContext))} />;
|
||||
|
||||
export default Page;
|
|
@ -1,9 +0,0 @@
|
|||
import ChangePasswordPage from "@ente/accounts/pages/change-password";
|
||||
import { APPS } from "@ente/shared/apps/constants";
|
||||
import { AppContext } from "pages/_app";
|
||||
import { useContext } from "react";
|
||||
|
||||
export default function ChangePassword() {
|
||||
const appContext = useContext(AppContext);
|
||||
return <ChangePasswordPage appContext={appContext} appName={APPS.PHOTOS} />;
|
||||
}
|
8
web/apps/photos/src/pages/credentials.tsx
Normal file
8
web/apps/photos/src/pages/credentials.tsx
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { ensure } from "@/utils/ensure";
|
||||
import Page_ from "@ente/accounts/pages/credentials";
|
||||
import { useContext } from "react";
|
||||
import { AppContext } from "./_app";
|
||||
|
||||
const Page = () => <Page_ appContext={ensure(useContext(AppContext))} />;
|
||||
|
||||
export default Page;
|
|
@ -1,9 +0,0 @@
|
|||
import CredentialPage from "@ente/accounts/pages/credentials";
|
||||
import { APPS } from "@ente/shared/apps/constants";
|
||||
import { AppContext } from "pages/_app";
|
||||
import { useContext } from "react";
|
||||
|
||||
export default function Credential() {
|
||||
const appContext = useContext(AppContext);
|
||||
return <CredentialPage appContext={appContext} appName={APPS.PHOTOS} />;
|
||||
}
|
8
web/apps/photos/src/pages/generate.tsx
Normal file
8
web/apps/photos/src/pages/generate.tsx
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { ensure } from "@/utils/ensure";
|
||||
import Page_ from "@ente/accounts/pages/generate";
|
||||
import { useContext } from "react";
|
||||
import { AppContext } from "./_app";
|
||||
|
||||
const Page = () => <Page_ appContext={ensure(useContext(AppContext))} />;
|
||||
|
||||
export default Page;
|
|
@ -1,9 +0,0 @@
|
|||
import GeneratePage from "@ente/accounts/pages/generate";
|
||||
import { APPS } from "@ente/shared/apps/constants";
|
||||
import { AppContext } from "pages/_app";
|
||||
import { useContext } from "react";
|
||||
|
||||
export default function Generate() {
|
||||
const appContext = useContext(AppContext);
|
||||
return <GeneratePage appContext={appContext} appName={APPS.PHOTOS} />;
|
||||
}
|
8
web/apps/photos/src/pages/login.tsx
Normal file
8
web/apps/photos/src/pages/login.tsx
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { ensure } from "@/utils/ensure";
|
||||
import Page_ from "@ente/accounts/pages/login";
|
||||
import { useContext } from "react";
|
||||
import { AppContext } from "./_app";
|
||||
|
||||
const Page = () => <Page_ appContext={ensure(useContext(AppContext))} />;
|
||||
|
||||
export default Page;
|
|
@ -1,9 +0,0 @@
|
|||
import LoginPage from "@ente/accounts/pages/login";
|
||||
import { APPS } from "@ente/shared/apps/constants";
|
||||
import { AppContext } from "pages/_app";
|
||||
import { useContext } from "react";
|
||||
|
||||
export default function Login() {
|
||||
const appContext = useContext(AppContext);
|
||||
return <LoginPage appContext={appContext} appName={APPS.PHOTOS} />;
|
||||
}
|
3
web/apps/photos/src/pages/passkeys/finish.tsx
Normal file
3
web/apps/photos/src/pages/passkeys/finish.tsx
Normal file
|
@ -0,0 +1,3 @@
|
|||
import Page from "@ente/accounts/pages/passkeys/finish";
|
||||
|
||||
export default Page;
|
|
@ -1,11 +0,0 @@
|
|||
import PasskeysFinishPage from "@ente/accounts/pages/passkeys/finish";
|
||||
|
||||
const PasskeysFinish = () => {
|
||||
return (
|
||||
<>
|
||||
<PasskeysFinishPage />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default PasskeysFinish;
|
8
web/apps/photos/src/pages/recover.tsx
Normal file
8
web/apps/photos/src/pages/recover.tsx
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { ensure } from "@/utils/ensure";
|
||||
import Page_ from "@ente/accounts/pages/recover";
|
||||
import { useContext } from "react";
|
||||
import { AppContext } from "./_app";
|
||||
|
||||
const Page = () => <Page_ appContext={ensure(useContext(AppContext))} />;
|
||||
|
||||
export default Page;
|
|
@ -1,10 +0,0 @@
|
|||
import RecoverPage from "@ente/accounts/pages/recover";
|
||||
import { APPS } from "@ente/shared/apps/constants";
|
||||
import { AppContext } from "pages/_app";
|
||||
import { useContext } from "react";
|
||||
|
||||
export default function Recover() {
|
||||
const appContext = useContext(AppContext);
|
||||
|
||||
return <RecoverPage appContext={appContext} appName={APPS.PHOTOS} />;
|
||||
}
|
8
web/apps/photos/src/pages/signup.tsx
Normal file
8
web/apps/photos/src/pages/signup.tsx
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { ensure } from "@/utils/ensure";
|
||||
import Page_ from "@ente/accounts/pages/signup";
|
||||
import { useContext } from "react";
|
||||
import { AppContext } from "./_app";
|
||||
|
||||
const Page = () => <Page_ appContext={ensure(useContext(AppContext))} />;
|
||||
|
||||
export default Page;
|
|
@ -1,9 +0,0 @@
|
|||
import SignupPage from "@ente/accounts/pages/signup";
|
||||
import { APPS } from "@ente/shared/apps/constants";
|
||||
import { AppContext } from "pages/_app";
|
||||
import { useContext } from "react";
|
||||
|
||||
export default function Sigup() {
|
||||
const appContext = useContext(AppContext);
|
||||
return <SignupPage appContext={appContext} appName={APPS.PHOTOS} />;
|
||||
}
|
8
web/apps/photos/src/pages/two-factor/recover.tsx
Normal file
8
web/apps/photos/src/pages/two-factor/recover.tsx
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { ensure } from "@/utils/ensure";
|
||||
import Page_ from "@ente/accounts/pages/two-factor/recover";
|
||||
import { useContext } from "react";
|
||||
import { AppContext } from "../_app";
|
||||
|
||||
const Page = () => <Page_ appContext={ensure(useContext(AppContext))} />;
|
||||
|
||||
export default Page;
|
|
@ -1,11 +0,0 @@
|
|||
import TwoFactorRecoverPage from "@ente/accounts/pages/two-factor/recover";
|
||||
import { APPS } from "@ente/shared/apps/constants";
|
||||
import { AppContext } from "pages/_app";
|
||||
import { useContext } from "react";
|
||||
|
||||
export default function TwoFactorRecover() {
|
||||
const appContext = useContext(AppContext);
|
||||
return (
|
||||
<TwoFactorRecoverPage appContext={appContext} appName={APPS.PHOTOS} />
|
||||
);
|
||||
}
|
8
web/apps/photos/src/pages/two-factor/setup.tsx
Normal file
8
web/apps/photos/src/pages/two-factor/setup.tsx
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { ensure } from "@/utils/ensure";
|
||||
import Page_ from "@ente/accounts/pages/two-factor/setup";
|
||||
import { useContext } from "react";
|
||||
import { AppContext } from "../_app";
|
||||
|
||||
const Page = () => <Page_ appContext={ensure(useContext(AppContext))} />;
|
||||
|
||||
export default Page;
|
|
@ -1,9 +0,0 @@
|
|||
import TwoFactorSetupPage from "@ente/accounts/pages/two-factor/setup";
|
||||
import { APPS } from "@ente/shared/apps/constants";
|
||||
import { AppContext } from "pages/_app";
|
||||
import { useContext } from "react";
|
||||
|
||||
export default function TwoFactorSetup() {
|
||||
const appContext = useContext(AppContext);
|
||||
return <TwoFactorSetupPage appContext={appContext} appName={APPS.PHOTOS} />;
|
||||
}
|
8
web/apps/photos/src/pages/two-factor/verify.tsx
Normal file
8
web/apps/photos/src/pages/two-factor/verify.tsx
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { ensure } from "@/utils/ensure";
|
||||
import Page_ from "@ente/accounts/pages/two-factor/verify";
|
||||
import { useContext } from "react";
|
||||
import { AppContext } from "../_app";
|
||||
|
||||
const Page = () => <Page_ appContext={ensure(useContext(AppContext))} />;
|
||||
|
||||
export default Page;
|
|
@ -1,11 +0,0 @@
|
|||
import TwoFactorVerifyPage from "@ente/accounts/pages/two-factor/verify";
|
||||
import { APPS } from "@ente/shared/apps/constants";
|
||||
import { AppContext } from "pages/_app";
|
||||
import { useContext } from "react";
|
||||
|
||||
export default function TwoFactorVerify() {
|
||||
const appContext = useContext(AppContext);
|
||||
return (
|
||||
<TwoFactorVerifyPage appContext={appContext} appName={APPS.PHOTOS} />
|
||||
);
|
||||
}
|
8
web/apps/photos/src/pages/verify.tsx
Normal file
8
web/apps/photos/src/pages/verify.tsx
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { ensure } from "@/utils/ensure";
|
||||
import Page_ from "@ente/accounts/pages/verify";
|
||||
import { useContext } from "react";
|
||||
import { AppContext } from "./_app";
|
||||
|
||||
const Page = () => <Page_ appContext={ensure(useContext(AppContext))} />;
|
||||
|
||||
export default Page;
|
|
@ -1,9 +0,0 @@
|
|||
import VerifyPage from "@ente/accounts/pages/verify";
|
||||
import { APPS } from "@ente/shared/apps/constants";
|
||||
import { AppContext } from "pages/_app";
|
||||
import { useContext } from "react";
|
||||
|
||||
export default function Verify() {
|
||||
const appContext = useContext(AppContext);
|
||||
return <VerifyPage appContext={appContext} appName={APPS.PHOTOS} />;
|
||||
}
|
Loading…
Reference in a new issue