@@ -179,23 +179,16 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie
179179 canBeMissing : true ,
180180 } ) ;
181181 const [ onboardingCompanySize ] = useOnyx ( ONYXKEYS . ONBOARDING_COMPANY_SIZE , { canBeMissing : true } ) ;
182- const [ personalDetailsList ] = useOnyx ( ONYXKEYS . PERSONAL_DETAILS_LIST , { canBeMissing : true } ) ;
183182 const [ isLoadingApp ] = useOnyx ( ONYXKEYS . IS_LOADING_APP , { canBeMissing : true } ) ;
184183 const [ lastUpdateIDAppliedToClient ] = useOnyx ( ONYXKEYS . ONYX_UPDATES_LAST_UPDATE_ID_APPLIED_TO_CLIENT , { canBeMissing : true } ) ;
185- const currentAccountID = useMemo ( ( ) => {
186- if ( ! ( session && 'accountID' in session ) ) {
187- return - 1 ;
188- }
189- return session . accountID ?? CONST . DEFAULT_NUMBER_ID ;
190- } , [ session ] ) ;
191184
192185 const timezone = useMemo ( ( ) => {
193- const timezoneObject = personalDetailsList ?. [ currentAccountID ] ?. timezone ?? { } ;
194- if ( ! personalDetailsList || ! isEmptyObject ( timezoneObject ) ) {
186+ const timezoneObject = currentUserPersonalDetails ?. timezone ?? { } ;
187+ if ( ! currentUserPersonalDetails || ! isEmptyObject ( timezoneObject ) ) {
195188 return ;
196189 }
197190 return timezoneObject ;
198- } , [ currentAccountID , personalDetailsList ] ) ;
191+ } , [ currentUserPersonalDetails ] ) ;
199192
200193 useEffect ( ( ) => {
201194 if ( Navigation . isActiveRoute ( ROUTES . SIGN_IN_MODAL ) ) {
@@ -213,7 +206,7 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie
213206 selected : currentTimezone ,
214207 } ) ;
215208 }
216- } , [ session , personalDetailsList , timezone ?. automatic , timezone ?. selected ] ) ;
209+ } , [ session , timezone ?. automatic , timezone ?. selected ] ) ;
217210
218211 const modal = useRef < OnyxTypes . Modal > ( { } ) ;
219212 const { isOnboardingCompleted} = useOnboardingFlowRouter ( ) ;
0 commit comments