Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

cp

Manav Rathi3a5311cdcc43
diff --git a/web/packages/accounts/pages/change-password.tsx b/web/packages/accounts/pages/change-password.tsx
index ec367f6c82..b0e6dcb705 100644
--- a/web/packages/accounts/pages/change-password.tsx
+++ b/web/packages/accounts/pages/change-password.tsx
@@ -13,7 +13,7 @@ import {
convertBase64ToBuffer,
convertBufferToBase64,
} from "@ente/accounts/utils";
-import { APP_HOMES } from "@ente/shared/apps/constants";
+import { APP_HOMES, appNameToAppNameOld } from "@ente/shared/apps/constants";
import type { PageProps } from "@ente/shared/apps/types";
import { VerticallyCentered } from "@ente/shared/components/Container";
import FormPaper from "@ente/shared/components/Form/FormPaper";
@@ -35,7 +35,11 @@ import { t } from "i18next";
import { useRouter } from "next/router";
import { useEffect, useState } from "react";
-export default function ChangePassword({ appName }: PageProps) {
+const Page: React.FC<PageProps> = ({ appContext }) => {
+ const { appName } = appContext;
+
+ const appNameOld = appNameToAppNameOld(appName);
+
const [token, setToken] = useState<string>();
const [user, setUser] = useState<User>();
@@ -123,7 +127,7 @@ export default function ChangePassword({ appName }: PageProps) {
const redirectToAppHome = () => {
setData(LS_KEYS.SHOW_BACK_BUTTON, { value: true });
// TODO: Refactor the type of APP_HOMES to not require the ??
- router.push(APP_HOMES.get(appName) ?? "/");
+ router.push(APP_HOMES.get(appNameOld) ?? "/");
};
// TODO: Handle the case where user is not loaded yet.
@@ -146,4 +150,6 @@ export default function ChangePassword({ appName }: PageProps) {
</FormPaper>
</VerticallyCentered>
);
-}
+};
+
+export default Page;