Skip to content

Commit

Permalink
fix(style): themed safe area color (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fenrikur authored Sep 12, 2024
1 parent a825956 commit 00ecf37
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/routes/IndexRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { SafeAreaView } from "react-native-safe-area-context";

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

const safeAreaStyle = useThemeMemo((theme) => ({ ...StyleSheet.absoluteFillObject, backgroundColor: theme.background }));

return (
<SafeAreaView style={StyleSheet.absoluteFill}>
<SafeAreaView style={safeAreaStyle}>
<StatusBar backgroundColor={theme.background} style={themeType === "light" ? "dark" : "light"} />
<Stack.Navigator screenOptions={{ headerShown: false, detachPreviousScreen: false }}>
<Stack.Screen name="Areas" component={AreasRouter} />
Expand Down

0 comments on commit 00ecf37

Please sign in to comment.