Skip to content

Commit

Permalink
Simplify dark mode status bar handling
Browse files Browse the repository at this point in the history
  • Loading branch information
fjsj committed Jan 28, 2025
1 parent c5f7679 commit 6280db8
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,10 @@ export default function RootLayout() {

const { colorScheme } = useColorScheme();
return (
<SafeAreaProvider initialMetrics={initialWindowMetrics}>
<SafeAreaView className="h-full bg-background-50 md:w-full">
<StatusBar
style={colorScheme === "dark" ? "light" : "dark"}
backgroundColor={colorScheme === "dark" ? "black" : "white"}
/>
<GluestackUIProvider mode={colorScheme}>
<GluestackUIProvider mode={colorScheme}>
<SafeAreaProvider initialMetrics={initialWindowMetrics}>
<StatusBar />
<SafeAreaView className="h-full bg-background-0 md:w-full">
<MedplumProvider medplum={medplum}>
<GestureHandlerRootView className="flex-1">
<Stack
Expand All @@ -73,8 +70,8 @@ export default function RootLayout() {
/>
</GestureHandlerRootView>
</MedplumProvider>
</GluestackUIProvider>
</SafeAreaView>
</SafeAreaProvider>
</SafeAreaView>
</SafeAreaProvider>
</GluestackUIProvider>
);
}

0 comments on commit 6280db8

Please sign in to comment.