From 9fc5483eb8df7f7d728dae3a1babff7939e22963 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Tue, 25 Feb 2025 16:14:29 +0530 Subject: [PATCH] Shorten --- web/apps/accounts/src/pages/_app.tsx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/web/apps/accounts/src/pages/_app.tsx b/web/apps/accounts/src/pages/_app.tsx index b7428eb4dc..785150f50d 100644 --- a/web/apps/accounts/src/pages/_app.tsx +++ b/web/apps/accounts/src/pages/_app.tsx @@ -12,7 +12,7 @@ import { CssBaseline } from "@mui/material"; import { ThemeProvider } from "@mui/material/styles"; import { t } from "i18next"; import type { AppProps } from "next/app"; -import React, { useCallback, useMemo } from "react"; +import React, { useMemo } from "react"; const App: React.FC = ({ Component, pageProps }) => { useSetupLogs({ disableDiskLogs: true }); @@ -20,13 +20,11 @@ const App: React.FC = ({ Component, pageProps }) => { const isI18nReady = useSetupI18n(); const { showMiniDialog, miniDialogProps } = useAttributedMiniDialog(); - const logout = useCallback(() => { - // No code in the accounts app is currently expected to reach a code - // path where they would need to "logout". In any case, the accounts app - // doesn't store any user specific persistent state that'd need to be - // cleared, so there really isn't anything to do here. - assertionFailed(); - }, []); + // No code in the accounts app is currently expected to reach a code path + // where they would need to "logout". Also, the accounts app doesn't store + // any user specific persistent state that'd need to be cleared, so there + // really isn't anything to do here even if we needed to. + const logout = assertionFailed; const baseContext = useMemo( () => deriveBaseContext({ logout, showMiniDialog }),