Skip to content

Commit

Permalink
fix: 新規登録後にエラーになる問題を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
shun-shobon committed Nov 8, 2024
1 parent c03b12d commit 815c53b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/features/profile/useMyProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export function useMyProfile(): UseMyProfile {
},
{
suspense: true,
fallbackData: null,
refreshInterval: 1000 * 10,
},
);
Expand Down
9 changes: 6 additions & 3 deletions app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function Layout({ children }: { children: React.ReactNode }) {
<Background />
{children}
<Suspense fallback={null}>
<Nav />
<Nav path={location.pathname} />
</Suspense>
</ThemeProvider>
<ScrollRestoration />
Expand All @@ -83,7 +83,10 @@ export function Layout({ children }: { children: React.ReactNode }) {
);
}

function Nav(): ReactNode {
interface NavProps {
path: string;
}
function Nav({ path }: NavProps): ReactNode {
const { myProfile } = useMyProfile();

return (
Expand All @@ -94,7 +97,7 @@ function Nav(): ReactNode {
)}
style={{ viewTransitionName: "bottom-nav" }}
>
<BottomNav path={location.pathname} className="mx-auto" />
<BottomNav path={path} className="mx-auto" />
</div>
);
}
Expand Down

0 comments on commit 815c53b

Please sign in to comment.