Skip to content

Commit

Permalink
Merge pull request #57 from Kusitms-29th-ASAP/fix/#46
Browse files Browse the repository at this point in the history
[Fix] Deploy 오류 - window 오류 처리
  • Loading branch information
yyypearl authored May 18, 2024
2 parents 4002e00 + df41b2d commit e42fa00
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/app/auth/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ const Auth = () => {
const router = useRouter();
const REST_API_KEY = process.env.NEXT_PUBLIC_REST_API_KEY;
const REDIRECT_URI = process.env.NEXT_PUBLIC_REDIRECT_URI;
const AUTHORIZATION_CODE = new URL(window.location.href).searchParams.get(
"code"
);
("code");

useEffect(() => {
if (typeof window !== "undefined") {
const AUTHORIZATION_CODE = new URL(window.location.href).searchParams.get(
"code"
);
const ACCESS_TOKEN = localStorage.getItem("access_token");
postKakaoToken(ACCESS_TOKEN!!);

Expand Down Expand Up @@ -48,7 +49,7 @@ const Auth = () => {
})
.catch((err) => console.log(err));
}
}, []);
}, [REST_API_KEY, REDIRECT_URI, router]);

return null;
};
Expand Down

0 comments on commit e42fa00

Please sign in to comment.