diff --git a/front/apps/mobile/app/_layout.tsx b/front/apps/mobile/app/_layout.tsx index bebe9c1a..e7cfc5c4 100644 --- a/front/apps/mobile/app/_layout.tsx +++ b/front/apps/mobile/app/_layout.tsx @@ -21,7 +21,7 @@ import { PortalProvider } from "@gorhom/portal"; import { ThemeSelector } from "@kyoo/primitives"; import { NavbarRight, NavbarTitle } from "@kyoo/ui"; -import { createQueryClient } from "@kyoo/models"; +import { AccountContext, createQueryClient, useAccounts } from "@kyoo/models"; import { QueryClientProvider } from "@tanstack/react-query"; import i18next from "i18next"; import { Stack } from "expo-router"; @@ -37,8 +37,12 @@ import { useEffect, useState } from "react"; import { useColorScheme } from "react-native"; import { initReactI18next } from "react-i18next"; import { useTheme } from "yoshiki/native"; +import { Button, CircularProgress, H1, P, ts } from "@kyoo/primitives"; +import { useTranslation } from "react-i18next"; +import { View } from "react-native"; +import { useYoshiki } from "yoshiki/native"; +import { useRouter } from "solito/router"; import "intl-pluralrules"; -import { AccountContext, useAccounts } from "./index"; // TODO: use a backend to load jsons. import en from "../../../translations/en.json"; @@ -56,6 +60,26 @@ i18next.use(initReactI18next).init({ }, }); +export const ConnectionError = ({ error, retry }: { error?: string; retry: () => void }) => { + const { css } = useYoshiki(); + const { t } = useTranslation(); + const router = useRouter(); + + return ( + +

{t("errors.connection")}

+

{error ?? t("error.unknown")}

+

{t("errors.connection-tips")}

+