Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions apps/mobile/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,18 @@
"expo-image",
"expo-audio",
"expo-web-browser",
"expo-font",
"expo-splash-screen",
[
"expo-splash-screen",
{
"image": "./assets/splash-icon.png",
"imageWidth": 200,
"backgroundColor": "#ffffff",
"dark": {
"image": "./assets/splash-icon-dark.png",
"backgroundColor": "#000000"
}
}
],
[
"expo-notifications",
{
Expand Down
9 changes: 6 additions & 3 deletions apps/mobile/app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,21 @@ import {
} from "@/app-shell";
import { RootNavigator, RouteErrorBoundary } from "@/screens";
import { ThemeProvider } from "@/theme";
import { useAppFonts } from "@/theme/useAppFonts";
import { SheetProvider, Toaster } from "@/ui";

// Keep the native splash up until boot finishes; `RootLayout` hides it once
// `useAppBoot` is ready. Module scope so it runs before the first render
// (fonts are the platform system faces, so nothing else is awaited).
void SplashScreen.preventAutoHideAsync().catch(() => undefined);

// Deep links into a pushed screen still get home underneath.
export const unstable_settings = { anchor: "index" };

export { RouteErrorBoundary as ErrorBoundary };

export default function RootLayout() {
const fonts = useAppFonts();
const boot = useAppBoot();
const ready = fonts.ready && boot.ready;
const ready = boot.ready;

useEffect(() => {
if (ready) void SplashScreen.hideAsync().catch(() => undefined);
Expand Down
Loading
Loading