-
Notifications
You must be signed in to change notification settings - Fork 1
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
♻️ [WV-35] refactor : player coach detail 페이지 생성 #45
Conversation
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.
수고하였습니다.
궁금한 게 있는데, page 컴포넌트 자체를 async로 선언하는 것과 page안에서 async 함수로 데이터 패칭하는 것과 둘의 동작 차이가 있을까요?
api/player/apis.ts
Outdated
export const getCoachList = async (): Promise<CoachInfo[]> => { | ||
const url = `${BASE_URL}/player/coachlist`; | ||
const res = await fetch(url, { method: "GET" }); | ||
console.log(url, "나 유알엘엘에레엘엘에렝ㄹ"); |
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.
console 삭제해주세요
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.
삭제했슴당
구두로 설명 드렸습니당 |
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.
고생하셨습니다
개요
coach detail 페이지 생성
PR Checklist
PR이 다음 요구 사항을 충족하는지 확인하세요.
PR details
getCoachDetail api함수 생성
pcode값에 따른 동적 라우팅 페이지 (코칭스텝 디테일 페이지) 생성
원래 [id] - page.tsx로 폴더구조 되어있던거를 pcode로 수정했습니다.
app/(menu)/player/coach/[pcode]/page.tsx
coach-page.tsx에서 코치리스트 를 보여주고, 코치 플레이어 카드 누를경우 해당 코치의 pcode값을 params로 coach/[pcode]-page.tsx의 경로로 이동합니다.
coach > page.tsx
coach > [pcode] > page.tsx
2025-01-10.3.07.20.mov
정적 프리렌더링 비활성화 =>
export const dynamic = "force-dynamic";
When modifying code...