π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Clean
Manav Rathi5b9c173b0ee7
diff --git a/web/apps/accounts/src/pages/_app.tsx b/web/apps/accounts/src/pages/_app.tsxindex db75769166..845ac235f4 100644--- a/web/apps/accounts/src/pages/_app.tsx+++ b/web/apps/accounts/src/pages/_app.tsx@@ -3,8 +3,6 @@ import { CustomHead } from "@/next/components/Head";import { setupI18n } from "@/next/i18n";import { disableDiskLogs } from "@/next/log";import { logUnhandledErrorsAndRejections } from "@/next/log-web";-import { PAGES } from "@ente/accounts/constants/pages";-import { accountLogout } from "@ente/accounts/services/logout";import { Overlay } from "@ente/shared/components/Container";import DialogBoxV2 from "@ente/shared/components/DialogBoxV2";import type { DialogBoxAttributesV2 } from "@ente/shared/components/DialogBoxV2/types";@@ -15,11 +13,10 @@ import { getTheme } from "@ente/shared/themes";import { THEME_COLOR } from "@ente/shared/themes/constants";import { CssBaseline, useMediaQuery } from "@mui/material";import { ThemeProvider } from "@mui/material/styles";-import { AppContext } from "components/context";import { t } from "i18next";import type { AppProps } from "next/app";-import { useRouter } from "next/router";-import React, { useCallback, useEffect, useState } from "react";+import React, { useEffect, useState } from "react";+import { AppContext } from "../types/context";import "styles/global.css";@@ -32,7 +29,6 @@ const App: React.FC<AppProps> = ({ Component, pageProps }) => {const [dialogBoxV2View, setDialogBoxV2View] = useState(false);const isMobile = useMediaQuery("(max-width: 428px)");- const router = useRouter();useEffect(() => {disableDiskLogs();@@ -51,12 +47,7 @@ const App: React.FC<AppProps> = ({ Component, pageProps }) => {const closeDialogBoxV2 = () => setDialogBoxV2View(false);- const logout = useCallback(() => {- void accountLogout().then(() => router.push(PAGES.ROOT));- }, [router]);-const appContext = {- logout,showNavBar: setShowNavbar,isMobile,setDialogBoxAttributesV2,diff --git a/web/apps/accounts/src/types/context.ts b/web/apps/accounts/src/types/context.tsindex 18716db085..9b17cd6bdf 100644--- a/web/apps/accounts/src/types/context.ts+++ b/web/apps/accounts/src/types/context.ts@@ -4,10 +4,6 @@ import { createContext, useContext } from "react";/*** The type of the context for pages in the accounts app.- *- * - The accounts app has no extra properties on top of the base context.- *- * - It also doesn't need the logout function.*/interface AppContextT {/** Show or hide the app's navigation bar. */@@ -17,7 +13,7 @@ interface AppContextT {}/**- * The React {@link Context} available to all pages.+ * The React {@link Context} available to all nodes in the React tree.*/export const AppContext = createContext<AppContextT | undefined>(undefined);