-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore : 잘못 작성된 버튼 위치 수정 * refactor : 삭제 모달 컨텐츠 분리 * feat : 삭제 api를 편지 종류별로 분리 * Delete deleteLetters.ts * refactor : 삭제 모달 컨텐츠 분리 & handleRefresh 추가 * chore : 401 에러 디버깅용 콘솔출력/retry설정 * chore : 레터타입 아카이브에서 토글메뉴 삭제 * design : 보관함 상단 토글 z-index 수정 * refactor : handleDelete 함수 부모 컴포넌트로 이동 * chore : 삭제 관련 타입 수정 * feat : 아카이브 편지 삭제 함수 추가 * chore : 지도편지 삭제 타입 변경 * refactor : 삭제 대기 체크 리스트에서 편지 데이터를 모두 가지고 있도록 변경 * fix : 잘못 작성된 아카이브 편지 삭제 요청 배열을 아카이브 아이디 배열로 변경
- Loading branch information
Showing
12 changed files
with
202 additions
and
101 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from 'react'; | ||
import { useModal } from '@/hooks'; | ||
|
||
type DeleteModalProps = { | ||
handleDelete: () => void; | ||
}; | ||
|
||
export const DeleteModal = ({ handleDelete }: DeleteModalProps) => { | ||
const { closeModal } = useModal(); | ||
|
||
return ( | ||
<div className="flex flex-col items-center justify-center w-full h-full gap-3"> | ||
<div className="text-bold">정말 삭제하시겠습니까?</div> | ||
<div className="flex flex-row items-center justify-center w-full gap-1"> | ||
<button | ||
onClick={handleDelete} | ||
className="px-3 py-1 text-white rounded-sm bg-sample-blue" | ||
> | ||
예 | ||
</button> | ||
<button | ||
onClick={closeModal} | ||
className="px-3 py-1 bg-white border rounded-sm border-sample-blue text-sample-blue" | ||
> | ||
아니오 | ||
</button> | ||
</div> | ||
</div> | ||
); | ||
}; |
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
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,18 @@ | ||
import { defaultApi } from '@/service/api'; | ||
import { ApiResponseType } from '@/types/apiResponse'; | ||
|
||
type DeleteLetterType = { | ||
archiveIds: number[]; | ||
}; | ||
|
||
type deleteBookmarkLettersResponse = ApiResponseType<string>; | ||
|
||
export const deleteBookmarkLetters = async ( | ||
selectedList: DeleteLetterType | ||
): Promise<deleteBookmarkLettersResponse> => { | ||
const api = defaultApi(); | ||
const response = await api.delete('/map/archived', { | ||
data: selectedList | ||
}); | ||
return response.data; | ||
}; |
Oops, something went wrong.