π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Remove from context
Manav Rathi542de42875a9
diff --git a/web/apps/accounts/src/pages/_app.tsx b/web/apps/accounts/src/pages/_app.tsxindex a976533374..3dd98e7efe 100644--- a/web/apps/accounts/src/pages/_app.tsx+++ b/web/apps/accounts/src/pages/_app.tsx@@ -11,7 +11,7 @@ import { AppNavbar } from "@ente/shared/components/Navbar/app";import { clearData } from "@ente/shared/storage/localStorage";import { getTheme } from "@ente/shared/themes";import { THEME_COLOR } from "@ente/shared/themes/constants";-import { CssBaseline, useMediaQuery } from "@mui/material";+import { CssBaseline } from "@mui/material";import { ThemeProvider } from "@mui/material/styles";import { t } from "i18next";import type { AppProps } from "next/app";@@ -28,8 +28,6 @@ const App: React.FC<AppProps> = ({ Component, pageProps }) => {>();const [dialogBoxV2View, setDialogBoxV2View] = useState(false);- const isMobile = useMediaQuery("(max-width: 428px)");-useEffect(() => {disableDiskLogs();// The accounts app has no local state, but some older builds might've@@ -51,7 +49,6 @@ const App: React.FC<AppProps> = ({ Component, pageProps }) => {const appContext = {showNavBar: setShowNavbar,- isMobile,setDialogBoxAttributesV2,};diff --git a/web/apps/accounts/src/types/context.ts b/web/apps/accounts/src/types/context.tsindex 9b17cd6bdf..edd0a18ddd 100644--- a/web/apps/accounts/src/types/context.ts+++ b/web/apps/accounts/src/types/context.ts@@ -8,7 +8,6 @@ import { createContext, useContext } from "react";interface AppContextT {/** Show or hide the app's navigation bar. */showNavBar: (show: boolean) => void;- isMobile: boolean;setDialogBoxAttributesV2: (attrs: DialogBoxAttributesV2) => void;}diff --git a/web/apps/auth/src/pages/_app.tsx b/web/apps/auth/src/pages/_app.tsxindex 77bb013ad3..88d8ed2efd 100644--- a/web/apps/auth/src/pages/_app.tsx+++ b/web/apps/auth/src/pages/_app.tsx@@ -70,7 +70,6 @@ const App: React.FC<AppProps> = ({ Component, pageProps }) => {DialogBoxAttributesV2 | undefined>();const [dialogBoxV2View, setDialogBoxV2View] = useState(false);- const isMobile = useMediaQuery("(max-width: 428px)");const [themeColor, setThemeColor] = useLocalState(LS_KEYS.THEME,THEME_COLOR.DARK,@@ -143,7 +142,6 @@ const App: React.FC<AppProps> = ({ Component, pageProps }) => {const appContext = {logout,showNavBar,- isMobile,setDialogBoxAttributesV2,startLoading,finishLoading,diff --git a/web/apps/photos/src/components/Collections/AllCollections/index.tsx b/web/apps/photos/src/components/Collections/AllCollections/index.tsxindex 208062d30c..f039162c05 100644--- a/web/apps/photos/src/components/Collections/AllCollections/index.tsx+++ b/web/apps/photos/src/components/Collections/AllCollections/index.tsx@@ -1,11 +1,9 @@-import Divider from "@mui/material/Divider";+import { Divider, useMediaQuery } from "@mui/material";import {AllCollectionDialog,Transition,} from "components/Collections/AllCollections/dialog";import { COLLECTION_LIST_SORT_BY } from "constants/collection";-import { AppContext } from "pages/_app";-import { useContext } from "react";import { CollectionSummary } from "types/collection";import AllCollectionContent from "./content";import AllCollectionsHeader from "./header";@@ -32,7 +30,7 @@ export default function AllCollections(props: Iprops) {setCollectionListSortBy,isInHiddenSection,} = props;- const { isMobile } = useContext(AppContext);+ const isMobile = useMediaQuery("(max-width: 428px)");const onCollectionClick = (collectionID: number) => {setActiveCollectionID(collectionID);diff --git a/web/apps/photos/src/pages/_app.tsx b/web/apps/photos/src/pages/_app.tsxindex 46b83516a0..423808a1f2 100644--- a/web/apps/photos/src/pages/_app.tsx+++ b/web/apps/photos/src/pages/_app.tsx@@ -39,7 +39,7 @@ import { getTheme } from "@ente/shared/themes";import { THEME_COLOR } from "@ente/shared/themes/constants";import type { User } from "@ente/shared/user/types";import ArrowForward from "@mui/icons-material/ArrowForward";-import { CssBaseline, useMediaQuery } from "@mui/material";+import { CssBaseline } from "@mui/material";import { ThemeProvider } from "@mui/material/styles";import Notification from "components/Notification";import { REDIRECTS } from "constants/redirects";@@ -121,7 +121,6 @@ export default function App({ Component, pageProps }: AppProps) {const [dialogBoxV2View, setDialogBoxV2View] = useState(false);const [watchFolderView, setWatchFolderView] = useState(false);const [watchFolderFiles, setWatchFolderFiles] = useState<FileList>(null);- const isMobile = useMediaQuery("(max-width: 428px)");const [notificationView, setNotificationView] = useState(false);const closeNotification = () => setNotificationView(false);const [notificationAttributes, setNotificationAttributes] =@@ -319,7 +318,6 @@ export default function App({ Component, pageProps }: AppProps) {setWatchFolderView,watchFolderFiles,setWatchFolderFiles,- isMobile,setNotificationAttributes,themeColor,setThemeColor,diff --git a/web/packages/accounts/types/context.ts b/web/packages/accounts/types/context.tsindex 38a49dc4ee..92de7c7b74 100644--- a/web/packages/accounts/types/context.ts+++ b/web/packages/accounts/types/context.ts@@ -9,6 +9,5 @@ export interface AccountsContextT {logout: () => void;/** Show or hide the app's navigation bar. */showNavBar: (show: boolean) => void;- isMobile: boolean;setDialogBoxAttributesV2: (attrs: DialogBoxAttributesV2) => void;}