-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ✨ Feat: RetroList API 연결 및 페이지네이션 구현 * 💄 Design: RetroList 페이지 네이션 스타일 수정 및 기타 css 수정
- Loading branch information
Showing
19 changed files
with
461 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { GetRetrospectiveData, GetRetrospectiveRequest } from '@/api/@types/Retrospectives'; | ||
import axiosInstance from '@/api/axiosConfig'; | ||
|
||
export const queryGetRetrospective = async (requestData: GetRetrospectiveRequest): Promise<GetRetrospectiveData> => { | ||
try { | ||
const { page, size, order, status, keyword, isBookmarked } = requestData; | ||
const params: { [key: string]: any } = { | ||
page, | ||
size, | ||
order, | ||
isBookmarked, | ||
}; | ||
if (status !== 'ALL') { | ||
params.status = status; | ||
} | ||
if (keyword !== '') { | ||
params.keyword = keyword; | ||
} | ||
|
||
console.log(params); | ||
const response = await axiosInstance.get<GetRetrospectiveData>('/retrospectives', { | ||
params, | ||
}); | ||
// console.log('회고 get 성공', response.data); | ||
return response.data; | ||
} catch (error) { | ||
// console.log('회고 get 실패', error); | ||
throw new Error('회고 get 실패'); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { PatchRetrospectiveRequest, PatchRetrospectiveResponse } from '../@types/Retrospectives'; | ||
import axiosInstance from '@/api/axiosConfig'; | ||
|
||
export const patchRetrospective = async ( | ||
requestData: PatchRetrospectiveRequest, | ||
): Promise<PatchRetrospectiveResponse> => { | ||
try { | ||
console.log(requestData.retrospectiveId, 'patch 요청'); | ||
const response = await axiosInstance.patch<PatchRetrospectiveResponse>( | ||
`/retrospectives/${requestData.retrospectiveId}/bookmark`, | ||
); | ||
console.log('북마크 patch 성공', response.data); | ||
return response.data; | ||
} catch (error) { | ||
throw new Error('북마크 patch 실패'); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.