Skip to content

Commit

Permalink
πŸ› fix: hotfix suspense boundary at using useSearchParams()
Browse files Browse the repository at this point in the history
  • Loading branch information
kyubumjang committed Sep 29, 2024
1 parent aa204a6 commit 61c56dd
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/app/login/callback/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useEffect } from "react";
import useGetLoginUserInfo from "@/features/login/api/useGetLoginUserInfo";
import usePostKakaoCode from "@/features/login/api/usePostKakaoCode";

const LoginCallbackPage = () => {
const LoginCallback = () => {
const router = useRouter();
const searchParams = useSearchParams();
const code = searchParams.get("code");
Expand Down Expand Up @@ -46,11 +46,17 @@ const LoginCallbackPage = () => {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [code]);

return (
<div className="flex w-full h-screen justify-center items-center">
<ScaleLoader color="#4F118C" />
</div>
);
};

const LoginCallbackPage = () => {
return (
<Suspense>
<div className="flex w-full h-screen justify-center items-center">
<ScaleLoader color="#4F118C" />
</div>
<LoginCallback />
</Suspense>
);
};
Expand Down

0 comments on commit 61c56dd

Please sign in to comment.