Skip to content

Commit

Permalink
Update src/hooks/useResponsiveLayout.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Getabalew Tesfaye <[email protected]>
  • Loading branch information
rayane-djouah and getusha authored Feb 9, 2024
1 parent ec99856 commit c9bc960
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/useResponsiveLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type ResponsiveLayoutResult = {
*/
export default function useResponsiveLayout(): ResponsiveLayoutResult {
const {isSmallScreenWidth} = useWindowDimensions();
const state = navigationRef?.current?.getRootState?.();
const state = navigationRef?.current?.getRootState();
const lastRoute = state?.routes?.at(-1);
const lastRouteName = lastRoute?.name;
const isInModal = lastRouteName === NAVIGATORS.LEFT_MODAL_NAVIGATOR || lastRouteName === NAVIGATORS.RIGHT_MODAL_NAVIGATOR;
Expand Down

0 comments on commit c9bc960

Please sign in to comment.