@@ -2,9 +2,9 @@ import React, {useRef} from 'react';
22import type { ValueOf } from 'type-fest' ;
33import HeaderWithBackButton from '@components/HeaderWithBackButton' ;
44import ScreenWrapper from '@components/ScreenWrapper' ;
5- import SelectionList from '@components/SelectionListWithSections ' ;
6- import RadioListItem from '@components/SelectionListWithSections /RadioListItem' ;
7- import type { ListItem } from '@components/SelectionListWithSections /types' ;
5+ import SelectionList from '@components/SelectionList ' ;
6+ import RadioListItem from '@components/SelectionList/ListItem /RadioListItem' ;
7+ import type { ListItem } from '@components/SelectionList/ListItem /types' ;
88import Text from '@components/Text' ;
99import useLocalize from '@hooks/useLocalize' ;
1010import useOnyx from '@hooks/useOnyx' ;
@@ -21,7 +21,7 @@ type ThemeEntry = ListItem & {
2121function ThemePage ( ) {
2222 const styles = useThemeStyles ( ) ;
2323 const { translate} = useLocalize ( ) ;
24- const [ preferredTheme ] = useOnyx ( ONYXKEYS . PREFERRED_THEME ) ;
24+ const [ preferredTheme ] = useOnyx ( ONYXKEYS . PREFERRED_THEME , { canBeMissing : true } ) ;
2525 const isOptionSelected = useRef ( false ) ;
2626 const { DEFAULT , FALLBACK , ...themes } = CONST . THEME ;
2727 const localesToThemes = Object . values ( themes ) . map ( ( theme ) => ( {
@@ -50,11 +50,11 @@ function ThemePage() {
5050 />
5151 < Text style = { [ styles . mh5 , styles . mv4 ] } > { translate ( 'themePage.chooseThemeBelowOrSync' ) } </ Text >
5252 < SelectionList
53- sections = { [ { data : localesToThemes } ] }
53+ data = { localesToThemes }
5454 ListItem = { RadioListItem }
5555 onSelectRow = { updateTheme }
5656 shouldSingleExecuteRowSelect
57- initiallyFocusedOptionKey = { localesToThemes . find ( ( theme ) => theme . isSelected ) ?. keyForList }
57+ initiallyFocusedItemKey = { localesToThemes . find ( ( theme ) => theme . isSelected ) ?. keyForList }
5858 />
5959 </ ScreenWrapper >
6060 ) ;
0 commit comments