Skip to content

Commit 00ecf37

Browse files
authored
fix(style): themed safe area color (#167)
1 parent a825956 commit 00ecf37

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/routes/IndexRouter.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { SafeAreaView } from "react-native-safe-area-context";
77

88
import { Toast } from "../components/Toast";
99
import { useToastMessages } from "../context/ToastContext";
10-
import { useTheme, useThemeName } from "../hooks/themes/useThemeHooks";
10+
import { useTheme, useThemeMemo, useThemeName } from "../hooks/themes/useThemeHooks";
1111
import { RecordId } from "../store/eurofurence/types";
1212
import { About } from "./About";
1313
import { AreasRouter, AreasRouterParams } from "./AreasRouter";
@@ -80,8 +80,10 @@ export const IndexRouter: FC<IndexRouterProps> = () => {
8080
const toastMessages = useToastMessages(5);
8181
const isAreas = useNavigationState((s) => (!s ? false : s.routes?.[s.index]?.name === "Areas"));
8282

83+
const safeAreaStyle = useThemeMemo((theme) => ({ ...StyleSheet.absoluteFillObject, backgroundColor: theme.background }));
84+
8385
return (
84-
<SafeAreaView style={StyleSheet.absoluteFill}>
86+
<SafeAreaView style={safeAreaStyle}>
8587
<StatusBar backgroundColor={theme.background} style={themeType === "light" ? "dark" : "light"} />
8688
<Stack.Navigator screenOptions={{ headerShown: false, detachPreviousScreen: false }}>
8789
<Stack.Screen name="Areas" component={AreasRouter} />

0 commit comments

Comments
 (0)