Skip to content

[4주차/표표] 워크북 제출합니다. - #51

Merged
pyopyojihun merged 2 commits into
UMC-Inha:표표/mainfrom
pyopyojihun:main
Oct 14, 2025
Merged

pyopyojihun merged 2 commits into
UMC-Inha:표표/mainfrom
pyopyojihun:main

Conversation

@pyopyojihun

@pyopyojihun pyopyojihun commented Oct 10, 2025 •

Copy link
Copy Markdown

✅ 워크북 체크리스트

  • 모든 핵심 키워드 정리를 마쳤나요?
  • 핵심 키워드에 대해 완벽히 이해하셨나요?
  • 이론 학습 이후 직접 실습을 해보는 시간을 가졌나요?
  • 미션을 수행하셨나요?
  • 미션을 기록하셨나요?

✅ 컨벤션 체크리스트

  • 디렉토리 구조 컨벤션을 잘 지켰나요?
  • pr 제목을 컨벤션에 맞게 작성하였나요?
  • pr에 해당되는 이슈를 연결하였나요?(중요)
  • 적절한 라벨을 설정하였나요?
  • 파트장에게 code review를 요청하기 위해 reviewer를 등록하였나요?
  • 닉네임/main 브랜치의 최신 상태를 반영하고 있는지 확인했나요?(매우 중요!)

📌 주안점

Comment on lines +6 to +17
type MovieDetail = {
id: number;
title: string;
overview: string;
poster_path: string | null;
backdrop_path: string | null;
release_date: string;
runtime: number;
vote_average: number;
genres: { id: number; name: string }[];
credits?: { cast: { id: number; name: string; character: string; profile_path: string | null }[] };
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

type MovieDetail = {
id: number;
title: string;
overview?: string | null;
poster_path?: string | null;
backdrop_path?: string | null;
release_date?: string;
runtime?: number | null;
vote_average?: number | null;
genres?: { id: number; name: string }[];
credits?: {
cast?: {
id: number;
name: string;
character?: string;
profile_path?: string | null;
}[];
};
};
이렇게 바꾸면 더 안전할 것 같아요!

@pyopyojihun pyopyojihun Oct 12, 2025 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

cast와 credits에 ? 를 주어서 아무것도 없을 수 있음을 반영해 입력에 안전하다는 뜻이군용!! 감사합니다

type MovieDetail = {
id: number;
title: string;
overview?: string | null;
poster_path?: string | null;
backdrop_path?: string | null;
release_date?: string;
runtime?: number | null;
vote_average?: number | null;
genres: { id: number; name: string }[];
credits?: {
cast?: {
id: number;
name: string;
character?: string;
profile_path?: string | null;
}[];
};
};

이렇게 바꿔봤습니다!

@@ -0,0 +1,15 @@
import { Outlet } from 'react-router-dom';
import { Navbar } from '../components/Navbar';
import { useCustomFetch } from '../hooks/useCustomFetch';

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

현재 페이지에서 useCustomFetch를 사용하지 않으니 경고가 뜰 수 있습니다. import 지워주세요

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

import { Outlet } from 'react-router-dom';
import { Navbar } from '../components/Navbar';



const HomePage = () => {
    return (
        <>
            <Navbar />
            <Outlet />
        </>
    );
}

export default HomePage;

지우고 경고 삭제 됐습니다!

import { postSignup } from "../apis/auth"; // 경로는 프로젝트에 맞게
import type { RequestSignupDto } from "../types/auth"; // { name:string; email:string; password:string } 형태라고 가정

/* ---------------- Zod 전체 스키마 ---------------- */

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

SignupPage.tsx 코드가 전체 폼 로직과 검증 로직을 모두 포함하고 있어서 파일 코드 길이가 깁니다.
가독성과 유지보수를 위해 Zod 스키마 부분을 별도의 파일(ex) src/schemas/signup.ts처럼 분리)로 분리해 관리하는 걸 추천합니다.

[JSON.stringify(options ?? {})]
);

useEffect(() => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

비동기 요청을 AbortController로 제어해 컴포넌트 언마운트 시 불필요한 상태 업데이트를 방지한 점이 좋습니다!

bio:string|null;
avatar:string|null;
createdAt:Date;
updateAt:Date;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

DTO 타입들을 별도의 파일로 분리해 관리한 점이 좋습니다.
API 요청/응답 구조를 한눈에 파악할 수 있어서 유지보수성에 좋아보입니댱

@sunnyinha

Copy link
Copy Markdown
Collaborator

표표, 4주차도 수고하셨습니다! 머지해주세요~

@pyopyojihun
pyopyojihun merged commit 74acbf1 into UMC-Inha:표표/main Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chapter04_사용자 인증부터 폼 유효성 검사까지, 서비스의 기본기 다지기

4 participants