Skip to content

Conversation

@hyeok02
Copy link
Collaborator

@hyeok02 hyeok02 commented Apr 5, 2025

πŸ“ λ―Έμ…˜ 번호

3μ£Όμ°¨ Misson 1,2,3

πŸ“‹ κ΅¬ν˜„ 사항

  • useEffect ν™œμš©ν•΄μ„œ 데이터 뢈러였기
  • λ‘œλ”© μ—λŸ¬ 처리 및 μ—¬λŸ¬κ°œμ˜ νŽ˜μ΄μ§€ λΌμš°νŒ… 처리
  • μ˜ν™” IDλ₯Ό ν™œμš©ν•˜μ—¬, μ˜ν™” 상세 νŽ˜μ΄μ§€ λ§Œλ“€κΈ°

πŸ“Ž μŠ€ν¬λ¦°μƒ·

image image image

βœ… 체크리슀트

  • Merge ν•˜λ €λŠ” λΈŒλžœμΉ˜κ°€ μ˜¬λ°”λ₯΄κ²Œ μ„€μ •λ˜μ–΄ μžˆλ‚˜μš”?
  • λ‘œμ»¬μ—μ„œ μ‹€ν–‰ν–ˆμ„ λ•Œ μ—λŸ¬κ°€ λ°œμƒν•˜μ§€ μ•Šλ‚˜μš”?
  • λΆˆν•„μš”ν•œ 주석이 μ œκ±°λ˜μ—ˆλ‚˜μš”?
  • μ½”λ“œ μŠ€νƒ€μΌμ΄ μΌκ΄€μ μΈκ°€μš”?

πŸ€” 질문 사항

@hyeok02 hyeok02 self-assigned this Apr 5, 2025
Copy link
Member

@hyesngy hyesngy left a comment

Choose a reason for hiding this comment

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

고생 λ§ŽμœΌμ…¨μŠ΅λ‹ˆλ‹€!πŸ‘πŸ‘
이번 μ£Ό μ›Œν¬λΆμ„ 톡해 useEffect, API 연동, λΌμš°νŒ…κ³Ό μƒνƒœ κ΄€λ¦¬κΉŒμ§€ κ²½ν—˜ν•΄λ³΄μ…¨λ„€μš”!
κ³„μ†ν•΄μ„œ μ‹€μŠ΅κ³Ό ν•™μŠ΅μ„ λ³‘ν–‰ν•˜λ©° μ‹€λ ₯을 μŒ“μ•„κ°€μ‹œκΈΈ μ‘μ›ν•©λ‹ˆλ‹€!!πŸ‘πŸ‘

Comment on lines +3 to +24
interface Movie {
title?: string;
original_title?: string;
release_date?: string;
vote_average?: number;
runtime?: number;
tagline?: string;
overview?: string;
poster_path?: string;
}

interface Person {
name: string;
original_name: string;
profile_path: string;
}

interface Props {
movie: Movie;
directorInfo?: Person;
mainCast: Person[];
}
Copy link
Member

Choose a reason for hiding this comment

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

Movie, Person, Props μΈν„°νŽ˜μ΄μŠ€κ°€ ν˜„μž¬ λ‹€λ₯Έ νŒŒμΌμ—μ„œλ„ μ‚¬μš©λ˜κ³  μžˆλŠ”λ°, types ν΄λ”λ‘œ λΆ„λ¦¬ν•˜λ©΄ μž¬μ‚¬μš©μ„± μΈ‘λ©΄μ—μ„œλ„ μ’‹κ³  가독성도 더 μ’‹μ•„μ§ˆ 것 κ°™μŠ΅λ‹ˆλ‹€!

Comment on lines +19 to +47
const fetchMovieDetails = async (movieId: string): Promise<Movie> => {
const response = await fetch(
`https://api.themoviedb.org/3/movie/${movieId}?language=ko-KR`,
{
headers: {
Authorization: `Bearer ${import.meta.env.VITE_API_KEY}`,
},
}
);
if (!response.ok) {
throw new Error("μ˜ν™” 상세 정보λ₯Ό κ°€μ Έμ˜€λŠ” 데 μ‹€νŒ¨ν–ˆμŠ΅λ‹ˆλ‹€.");
}
return response.json();
};

const fetchCredits = async (movieId: string): Promise<Credits> => {
const response = await fetch(
`https://api.themoviedb.org/3/movie/${movieId}/credits?language=ko-KR`,
{
headers: {
Authorization: `Bearer ${import.meta.env.VITE_API_KEY}`,
},
}
);
if (!response.ok) {
throw new Error("μ˜ν™” ν¬λ ˆλ”§ 정보λ₯Ό κ°€μ Έμ˜€λŠ” 데 μ‹€νŒ¨ν–ˆμŠ΅λ‹ˆλ‹€.");
}
return response.json();
};
Copy link
Member

Choose a reason for hiding this comment

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

이 API 호좜 ν•¨μˆ˜ 뢀뢄을 λ”°λ‘œ λΆ„λ¦¬ν•˜λ©΄ ν”„λ‘œμ νŠΈ ꡬ쑰가 λͺ…ν™•ν•΄μ§€κ³  가독성도 μ’‹μ•„μ§ˆ 것 κ°™μ•„μš”!

Copy link
Member

@hyesngy hyesngy left a comment

Choose a reason for hiding this comment

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

ν˜„μž¬ 2μ£Όμ°¨ λ―Έμ…˜ 폴더에 .vite/deps 폴더 파일이 μ˜¬λΌμ™€μžˆλŠ”λ° 제거 λΆ€νƒλ“œλ¦½λ‹ˆλ‹€!

@hyeok02 hyeok02 merged commit 40d4301 into main Apr 8, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants