Skip to content

Commit 2b48ae1

Browse files
committed
feat: [FN-311] 카드셋 삭제 중 재시도 방지 처리
1 parent 8bbc1f1 commit 2b48ae1

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/pages/cardset-detail.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const CardsetDetail = ({ groupId, cardsetId }: Props) => {
3535
queryFn: () => groupApi.getGroupDetail(groupId),
3636
});
3737

38-
const { mutate } = useMutation({
38+
const { mutate, isPending } = useMutation({
3939
mutationFn: () => cardSetApi.deleteCardSet(groupId, cardsetId),
4040
onSuccess: () => {
4141
alert("카드셋 삭제에 성공했습니다.");
@@ -191,7 +191,11 @@ const CardsetDetail = ({ groupId, cardsetId }: Props) => {
191191
cardset={cardset}
192192
renderTrigger={<Button variant="outline">수정</Button>}
193193
/>
194-
<Button variant="outline" onClick={handleClickDelete}>
194+
<Button
195+
variant="outline"
196+
disabled={isPending}
197+
onClick={handleClickDelete}
198+
>
195199
삭제
196200
</Button>
197201
</div>

0 commit comments

Comments
 (0)