Skip to content

Commit 1a0ed97

Browse files
committed
centralize status bar style with other scheme constants
1 parent 4df444d commit 1a0ed97

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

source/app.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export default function App(): JSX.Element {
2929
const navigationRef = React.useRef()
3030
const scheme = useColorScheme()
3131
const theme = scheme === 'dark' ? CombinedDarkTheme : CombinedLightTheme
32+
const statusBarStyle = scheme === 'dark' ? 'light-content' : 'dark-content'
3233

3334
return (
3435
<ReduxProvider store={store}>
@@ -51,11 +52,7 @@ export default function App(): JSX.Element {
5152
}}
5253
theme={theme}
5354
>
54-
<StatusBar
55-
barStyle={
56-
scheme === 'dark' ? 'light-content' : 'dark-content'
57-
}
58-
/>
55+
<StatusBar barStyle={statusBarStyle} />
5956
<RootStack />
6057
</NavigationContainer>
6158
</ActionSheetProvider>

0 commit comments

Comments
 (0)