|
|
|
@ -38,12 +38,7 @@ export const useBankCards = () => { |
|
|
|
.then(fetchCards) |
|
|
|
.then(fetchCards) |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
const onDeleteCard = async (cardId: string) => { |
|
|
|
const onDeleteCard = (cardId: string) => deleteCard(cardId).then(fetchCards) |
|
|
|
await deleteCard(cardId).then(() => { |
|
|
|
|
|
|
|
fetchCards() |
|
|
|
|
|
|
|
toggleInfoModal() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
const { isFetching, request: handleCardDelete } = useRequest(onDeleteCard) |
|
|
|
const { isFetching, request: handleCardDelete } = useRequest(onDeleteCard) |
|
|
|
|
|
|
|
|
|
|
|
const onSetDefaultCard = (cardId: string) => { |
|
|
|
const onSetDefaultCard = (cardId: string) => { |
|
|
|
|