Wait for i18n loaded before accessing messages

This commit is contained in:
Manav Rathi 2024-04-28 15:51:08 +05:30
parent 650a078fd7
commit 69193e374c
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -140,7 +140,7 @@ export default function App({ Component, pageProps }: AppProps) {
<CssBaseline enableColorScheme />
{showNavbar && <AppNavbar isMobile={isMobile} />}
<MessageContainer>
{offline && t("OFFLINE_MSG")}
{isI18nReady && offline && t("OFFLINE_MSG")}
</MessageContainer>
<LoadingBar color="#51cd7c" ref={loadingBar} />

View file

@ -352,7 +352,7 @@ export default function App({ Component, pageProps }: AppProps) {
<CssBaseline enableColorScheme />
{showNavbar && <AppNavbar isMobile={isMobile} />}
<MessageContainer>
{offline && t("OFFLINE_MSG")}
{isI18nReady && offline && t("OFFLINE_MSG")}
</MessageContainer>
{sharedFiles &&
(router.pathname === "/gallery" ? (