File tree Expand file tree Collapse file tree 5 files changed +11
-12
lines changed
Expand file tree Collapse file tree 5 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ export const clubs: Club[] = [
239239
240240export const mockClubDetail : ClubDetail [ ] = [
241241 {
242- id : 1 ,
242+ clubId : 1 ,
243243 clubName : '인터엑스' ,
244244 location : '공7 201호' ,
245245 category : '사회연구' ,
@@ -268,7 +268,7 @@ export const mockClubDetail: ClubDetail[] = [
268268 applicationNotice : '현재 지원은 휴학생을 제외한 1~3학년만 받고 있습니다.' ,
269269 } ,
270270 {
271- id : 2 ,
271+ clubId : 2 ,
272272 clubName : '코드마스터' ,
273273 location : '공5 102호' ,
274274 category : '프로그래밍' ,
@@ -296,7 +296,7 @@ export const mockClubDetail: ClubDetail[] = [
296296 applicationNotice : '1~4학년 모두 지원 가능합니다.' ,
297297 } ,
298298 {
299- id : 3 ,
299+ clubId : 3 ,
300300 clubName : '아트픽' ,
301301 location : '예술관 301호' ,
302302 category : '예술' ,
@@ -332,11 +332,11 @@ export const clubRepository = {
332332 } ,
333333
334334 getClubDetailById : ( id : number ) => {
335- return mockClubDetail . find ( ( club ) => club . id === id ) ;
335+ return mockClubDetail . find ( ( club ) => club . clubId === id ) ;
336336 } ,
337337
338338 updateClubDetail : ( id : number , updatedData : Partial < ClubDetail > ) => {
339- const index = mockClubDetail . findIndex ( ( club ) => club . id === id ) ;
339+ const index = mockClubDetail . findIndex ( ( club ) => club . clubId === id ) ;
340340 if ( index === - 1 ) return ;
341341
342342 mockClubDetail [ index ] = {
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export const ClubDetailPage = () => {
4747 regularMeetingInfo = { club . regularMeetingInfo }
4848 recruitStatus = { club . recruitStatus }
4949 applicationNotice = { club . applicationNotice }
50- clubId = { club . id }
50+ clubId = { club . clubId }
5151 />
5252 </ ContentRight >
5353 </ Layout >
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import type { ClubDetail } from '../types/clubDetail';
22
33const BASE_URL = import . meta. env . VITE_API_BASE_URL ;
44
5- export const fetchClubDetail = async ( clubId : string | number ) : Promise < ClubDetail > => {
5+ export const fetchClubDetail = async ( clubId : number ) : Promise < ClubDetail > => {
66 const res = await fetch ( `${ BASE_URL } /clubs/${ clubId } ` ) ;
77 if ( ! res . ok ) throw new Error ( '동아리 상세 정보를 가져오는데 실패했습니다.' ) ;
88 return res . json ( ) as Promise < ClubDetail > ;
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import type { ClubDetail } from '@/pages/user/ClubDetail/types/clubDetail';
55
66type ClubInfoSidebarSectionProps = Pick <
77 ClubDetail ,
8+ | 'clubId'
89 | 'presidentName'
910 | 'presidentPhoneNumber'
1011 | 'location'
@@ -13,11 +14,10 @@ type ClubInfoSidebarSectionProps = Pick<
1314 | 'regularMeetingInfo'
1415 | 'recruitStatus'
1516 | 'applicationNotice'
16- > & {
17- clubId : number ;
18- } ;
17+ > ;
1918
2019export const ClubInfoSidebarSection = ( {
20+ clubId,
2121 presidentName,
2222 presidentPhoneNumber,
2323 location,
@@ -26,7 +26,6 @@ export const ClubInfoSidebarSection = ({
2626 regularMeetingInfo,
2727 recruitStatus,
2828 applicationNotice,
29- clubId,
3029} : ClubInfoSidebarSectionProps ) => {
3130 return (
3231 < SidebarContainer >
Original file line number Diff line number Diff line change 11export type RecruitStatus = '모집중' | '모집 준비중' | '모집 종료' ;
22
33export type ClubDetail = {
4- id : number ;
4+ clubId : number ;
55 clubName : string ;
66 location : string ;
77 category : string ;
You can’t perform that action at this time.
0 commit comments