-
Notifications
You must be signed in to change notification settings - Fork 0
[week4/mission] 첫 커스텀 훅 만들어보기, 로그인 / 회원가입 기능 구현해보기 (feat. 유효성 검사) #24
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
base: jay/main
Are you sure you want to change the base?
Conversation
duwlsssss
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생했습니당 👏
| @@ -0,0 +1 @@ | |||
| VITE_TMDB_KEY=eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJlNjQzNjUzNTUyY2E5NjIxZGYxMDgwMjk3ODcwMTQ0MiIsIm5iZiI6MTc0MzY4NjE2Ny4zNjYwMDAyLCJzdWIiOiI2N2VlOGExNzU0ZjU5NWJiNTVhN2I3YWYiLCJzY29wZXMiOlsiYXBpX3JlYWQiXSwidmVyc2lvbiI6MX0.KEBQKM1JXCfZKAo7DIf9iLBUKJ3e4GAebLJNsPSaMVY No newline at end of file | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.env .gitignore에 추가해서 force push 필요할 듯...
| // const [movie,setMovie] = useState<MovieDetailResponse>() | ||
| // const [isPending,setIsPending] = useState(false) // loading state | ||
| // const [isError,setIsError] = useState(false) // error state | ||
|
|
||
|
|
||
| // useEffect(() => { | ||
| // const fetchMovies = async () => { | ||
| // setIsPending(true) | ||
|
|
||
| // try{ | ||
| // const {data} = await axios.get<MovieDetailResponse>( | ||
| // ``, | ||
| // { | ||
| // headers: { | ||
| // Authorization: `Bearer ${import.meta.env.VITE_TMDB_KEY}`, | ||
| // } | ||
| // }, | ||
| // ); | ||
|
|
||
| // setMovie(data); | ||
| // }catch{ | ||
| // setIsError(true); | ||
| // }finally{ | ||
| // setIsPending(false); | ||
| // } | ||
| // }; | ||
|
|
||
| // fetchMovies(); | ||
| // }, [params.movieId]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기 왜 주석인가여...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hooks 가 익숙하지 않기 때문에...!
|
|
||
| const MovieDetailPage =() => { | ||
|
|
||
| const params:Readonly<Params<string>> = useParams() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useParams로 가져온 값은 어차피 직접 수정하지 않고, Params도 굳이 쓸 필요 없어 보여서
const { movieId } = useParams<{ movieId: string }>();
이렇게 간단히 타입 정의할 수 있어용
qowldud
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다~!
✏️ 작업 내용
#️⃣ 연관된 이슈
#20
📷 작업 결과
💡 함께 공유하고 싶은 부분
🤔 질문
✅ 워크북 체크리스트
✅ 컨벤션 체크리스트