mirror of
https://github.com/ente-io/ente.git
synced 2025-08-08 07:28:26 +00:00
Fix
This commit is contained in:
parent
2213b7c39f
commit
a65ebacfbd
@ -2,7 +2,6 @@ import log from "@/next/log";
|
||||
import { ensure } from "@/utils/ensure";
|
||||
import { sendOtt } from "@ente/accounts/api/user";
|
||||
import { PAGES } from "@ente/accounts/constants/pages";
|
||||
import { APP_HOMES } from "@ente/shared/apps/constants";
|
||||
import { VerticallyCentered } from "@ente/shared/components/Container";
|
||||
import FormPaper from "@ente/shared/components/Form/FormPaper";
|
||||
import FormPaperFooter from "@ente/shared/components/Form/FormPaper/Footer";
|
||||
@ -23,6 +22,7 @@ import type { KeyAttributes, User } from "@ente/shared/user/types";
|
||||
import { t } from "i18next";
|
||||
import { useRouter } from "next/router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { appHomeRoute } from "../services/redirect";
|
||||
import type { PageProps } from "../types/page";
|
||||
|
||||
const bip39 = require("bip39");
|
||||
@ -55,8 +55,7 @@ const Page: React.FC<PageProps> = ({ appContext }) => {
|
||||
if (!keyAttributes) {
|
||||
router.push(PAGES.GENERATE);
|
||||
} else if (key) {
|
||||
// TODO: Refactor the type of APP_HOMES to not require the ??
|
||||
router.push(APP_HOMES.get(appNameOld) ?? "/");
|
||||
router.push(appHomeRoute(appName));
|
||||
} else {
|
||||
setKeyAttributes(keyAttributes);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import {
|
||||
} from "@ente/shared/constants/pages";
|
||||
|
||||
/**
|
||||
* The "home" route for each of our apps.
|
||||
* The default page ("home route") for each of our apps.
|
||||
*
|
||||
* This is where we redirect to after successful authentication.
|
||||
*/
|
||||
@ -14,8 +14,6 @@ export const appHomeRoute = (appName: AppName): string => {
|
||||
switch (appName) {
|
||||
case "accounts":
|
||||
return ACCOUNTS_PAGES.PASSKEYS;
|
||||
case "albums":
|
||||
return "/";
|
||||
case "auth":
|
||||
return AUTH_PAGES.AUTH;
|
||||
case "photos":
|
||||
|
@ -4,7 +4,7 @@ import type { DialogBoxAttributesV2 } from "@ente/shared/components/DialogBoxV2/
|
||||
* Arbitrary names that we used as keys for indexing various constants
|
||||
* corresponding to our apps that rely on this package.
|
||||
*/
|
||||
export type AppName = "accounts" | "albums" | "auth" | "photos";
|
||||
export type AppName = "accounts" | "auth" | "photos";
|
||||
|
||||
/**
|
||||
* Static title for the app.
|
||||
@ -13,7 +13,6 @@ export type AppName = "accounts" | "albums" | "auth" | "photos";
|
||||
*/
|
||||
export const appTitle: Record<AppName, string> = {
|
||||
accounts: "Ente Accounts",
|
||||
albums: "Ente Albums",
|
||||
auth: "Ente Auth",
|
||||
photos: "Ente Photos",
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user