Skip to content

Commit

Permalink
refactor: 함수 네이밍 개선
Browse files Browse the repository at this point in the history
  • Loading branch information
Creative-Lee committed Nov 15, 2023
1 parent 8e0a22f commit 0fbcfde
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions frontend/src/pages/AuthPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ const AuthPage = () => {
const { login } = useAuthContext();
const navigate = useNavigate();

// TODO: 함수 네이밍을 변경해야 합니다.
// 제안: 'code' param 여부 + 분기는 함수 외부로 빼는게 어떤가요?
// 분리한다면 함수 네이밍도 쉬워질 것 같아요.
const getAccessToken1 = async () => {
const authLogin = async () => {
const code = searchParams.get('code');

if (!code) {
Expand All @@ -34,7 +31,7 @@ const AuthPage = () => {
};

useEffect(() => {
getAccessToken1();
authLogin();
}, []);

return <Navigate to="/" replace />;
Expand Down

0 comments on commit 0fbcfde

Please sign in to comment.