@@ -9,13 +9,7 @@ import { useFonts } from 'expo-font';
99import { useKeepAwake } from 'expo-keep-awake' ;
1010import { StatusBar } from 'expo-status-bar' ;
1111import * as Updates from 'expo-updates' ;
12- import {
13- PaperProvider ,
14- MD2DarkTheme ,
15- MD2LightTheme ,
16- MD3DarkTheme ,
17- MD3LightTheme ,
18- } from 'react-native-paper' ;
12+ import { PaperProvider , MD3DarkTheme , MD3LightTheme } from 'react-native-paper' ;
1913import { SafeAreaInsetsContext } from 'react-native-safe-area-context' ;
2014
2115import DrawerItems from './DrawerItems' ;
@@ -49,7 +43,7 @@ export default function PaperExample() {
4943 const [ shouldUseDeviceColors , setShouldUseDeviceColors ] =
5044 React . useState ( true ) ;
5145 const [ isDarkMode , setIsDarkMode ] = React . useState ( false ) ;
52- const [ themeVersion , setThemeVersion ] = React . useState < 2 | 3 > ( 3 ) ;
46+ const [ _ , setThemeVersion ] = React . useState < 2 | 3 > ( 3 ) ;
5347 const [ rtl , setRtl ] = React . useState < boolean > (
5448 I18nManager . getConstants ( ) . isRTL
5549 ) ;
@@ -59,18 +53,14 @@ export default function PaperExample() {
5953
6054 const { theme : mdTheme } = useMaterial3Theme ( ) ;
6155 const theme = React . useMemo ( ( ) => {
62- if ( themeVersion === 2 ) {
63- return isDarkMode ? MD2DarkTheme : MD2LightTheme ;
64- }
65-
6656 if ( ! deviceColorsSupported || ! shouldUseDeviceColors ) {
6757 return isDarkMode ? MD3DarkTheme : MD3LightTheme ;
6858 }
6959
7060 return isDarkMode
7161 ? { ...MD3DarkTheme , colors : mdTheme . dark }
7262 : { ...MD3LightTheme , colors : mdTheme . light } ;
73- } , [ isDarkMode , mdTheme , shouldUseDeviceColors , themeVersion ] ) ;
63+ } , [ isDarkMode , mdTheme , shouldUseDeviceColors ] ) ;
7464
7565 React . useEffect ( ( ) => {
7666 const restoreState = async ( ) => {
0 commit comments