Skip to content

Commit

Permalink
issue #238 refactor: header suspense refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
sikkzz committed Apr 22, 2024
1 parent b5fa240 commit c21f3b6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/waggle-service/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Suspense } from "react";
import { useNavigate } from "react-router-dom";
import { useRecoilValue } from "recoil";

Expand All @@ -16,7 +17,6 @@ import { PATH } from "@/constants/path";
import useModal from "@/hooks/common/useModal";

import { headerStyle, headerBoxStyle, textStyle } from "@/components/Header/Header.style";
// import { Suspense } from "react";

const Header = () => {
const isLoggedIn = useRecoilValue(isLoggedInState);
Expand Down Expand Up @@ -52,7 +52,9 @@ const Header = () => {
</Text>
</Flex>
{isLoggedIn ? (
<LogInMenu />
<Suspense fallback={<div>로딩중</div>}>
<LogInMenu />
</Suspense>
) : (
<NotiIcon width={30} height={30} onClick={handleLoginModal} />
)}
Expand Down

0 comments on commit c21f3b6

Please sign in to comment.