Skip to content

Commit 4df444d

Browse files
committed
extract theme for reuse
1 parent e024775 commit 4df444d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

source/app.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export default function App(): JSX.Element {
2828
// Create a ref for the navigation container
2929
const navigationRef = React.useRef()
3030
const scheme = useColorScheme()
31+
const theme = scheme === 'dark' ? CombinedDarkTheme : CombinedLightTheme
3132

3233
return (
3334
<ReduxProvider store={store}>
@@ -39,7 +40,7 @@ export default function App(): JSX.Element {
3940
client={queryClient}
4041
persistOptions={{persister}}
4142
>
42-
<PaperProvider>
43+
<PaperProvider theme={theme}>
4344
<ActionSheetProvider>
4445
<NavigationContainer
4546
onReady={() => {
@@ -48,9 +49,7 @@ export default function App(): JSX.Element {
4849
navigationRef,
4950
)
5051
}}
51-
theme={
52-
scheme === 'dark' ? CombinedDarkTheme : CombinedLightTheme
53-
}
52+
theme={theme}
5453
>
5554
<StatusBar
5655
barStyle={

0 commit comments

Comments
 (0)