Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ feat: 카카오 로그인 페이지 작성 #59

Merged
merged 10 commits into from
Feb 2, 2024
Prev Previous commit
🔨 refactor: useNavigate 훅으로 변경
  • Loading branch information
bbearcookie committed Feb 2, 2024
commit b5feb657ad588776ead97256a822f6d5b5bada00
7 changes: 2 additions & 5 deletions src/pages/SigninKakaoPage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect } from 'react';
import { Navigate, useNavigate, useSearchParams } from 'react-router-dom';
import { useNavigate, useSearchParams } from 'react-router-dom';
import { useMutation } from '@tanstack/react-query';
import { ROUTER_PATHS } from '@/router';
import oauth2API from '@/api/oauth2/apis';
@@ -13,6 +13,7 @@ const SigninKakaoPage = () => {
useEffect(() => {
(async () => {
if (!code) {
navigate(ROUTER_PATHS.SIGNIN);
return;
}

@@ -26,10 +27,6 @@ const SigninKakaoPage = () => {
})();
}, []);

if (!code) {
return <Navigate to={ROUTER_PATHS.SIGNIN} />;
}

return <div>Loading...</div>;
};

Loading