Skip to content

refactor: #75/로그인, 회원가입 페이지 API 연결#105

Merged
hyeonjiroh merged 1 commit intomainfrom
refactor/#75/author
Mar 30, 2025
Merged

refactor: #75/로그인, 회원가입 페이지 API 연결#105
hyeonjiroh merged 1 commit intomainfrom
refactor/#75/author

Conversation

@ARON-Y
Copy link
Collaborator

@ARON-Y ARON-Y commented Mar 30, 2025

#️⃣ Issue Number

#75


📝 요약

  • 로그인 및 회원가입 페이지 API 연결
  • alert 메세지 매칭

🛠️ PR 유형

  • 새로운 기능 추가
  • 버그 수정
  • CSS 등 사용자 UI 디자인 변경
  • 코드에 영향을 주지 않는 변경사항(오타 수정, 변수명 변경 등)
  • 코드 리팩토링
  • 주석 추가 및 수정
  • 문서 수정
  • 테스트 추가, 테스트 리팩토링
  • 빌드 부분 혹은 패키지 매니저 수정
  • 파일 혹은 폴더명 수정
  • 파일 혹은 폴더 삭제

##스크린샷
스크린샷은 용량 이슈로 제 클라우드에 올려뒀습니다.
http://naver.me/FG7XcVkT

@ARON-Y ARON-Y self-assigned this Mar 30, 2025
@vercel
Copy link

vercel bot commented Mar 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
taskify ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 30, 2025 8:38am

import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import Input from "@/components/common/input/Input";
import { AuthLayout } from "@/app/(before-login)/(without-navbar)/layout";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

layout.tsx는 따로 import 해줄 필요 없이 children인 페이지의 레이아웃이 됩니다. 이 import 부분 삭제해보신 뒤 문제 없는지 확인해보시고, 문제 없다면 지워도 될 것 같습니다!

@@ -4,35 +4,56 @@ import { zodResolver } from "@hookform/resolvers/zod";
import Input from "@/components/common/input/Input";
import { AuthLayout } from "@/app/(before-login)/(without-navbar)/layout";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분도 위에서 말한 것 같이 지워도 괜찮을 것 같습니다!

localStorage.setItem("accessToken", response.accessToken);
openAlert("loginSuccess");
router.push("/mydashboard");
} catch (error: unknown) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

에러 처리까지 꼼꼼하게! 너무 멋집니다!

try {
const response = await fetchLogin(data);
setIsLoading(false);
localStorage.setItem("accessToken", response.accessToken);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

localStorage에 액세스 토큰을 저장하는군요. 로그아웃 기능 구현할 때 참고하겠습니다!

Copy link
Owner

@hyeonjiroh hyeonjiroh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코드도 깔끔하게 잘 짜시고, 기능 구현도 완벽하네요! zod 라이브러리를 사용해서 유효성 검사를 하신 점이 인상 깊었습니다. 정말 고생 많으셨어요!!

@hyeonjiroh hyeonjiroh merged commit d06b649 into main Mar 30, 2025
3 checks passed
@hyeonjiroh hyeonjiroh deleted the refactor/#75/author branch March 30, 2025 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants