Skip to content

Commit

Permalink
Refactor RootLayout component in mobile app
Browse files Browse the repository at this point in the history
  • Loading branch information
bigint committed Nov 8, 2024
1 parent 2f39397 commit 533575b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/mobile/app/(protected)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import "react-native-reanimated";

const RootLayout = () => {
const id = useAuthStore((state) => state.session.id);
// const hydrated = useAuthStore((state) => state.hydrated);
const hydrated = useAuthStore((state) => state.hydrated);
const setActiveProfile = useActiveProfile((state) => state.setProfile);

const { data } = useCurrentProfileQuery({
Expand All @@ -23,9 +23,9 @@ const RootLayout = () => {
}
}, [data]);

// if (!hydrated) {
// return null;
// }
if (!hydrated) {
return null;
}

if (!id) {
return <AuthScreen />;
Expand Down

0 comments on commit 533575b

Please sign in to comment.