From b88963f3f008d7c1cb5ea6148a98898d73598337 Mon Sep 17 00:00:00 2001 From: Mirlan Date: Mon, 27 Dec 2021 12:46:09 +0600 Subject: [PATCH] refactor(2127): hidden displaying popup after card deletion --- Makefile | 1 + src/features/CardsStore/hooks/index.tsx | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index d476019f..4b467971 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ install: npm install develop: + REACT_APP_TYPE=ott \ REACT_APP_CLIENT=instat \ npm start diff --git a/src/features/CardsStore/hooks/index.tsx b/src/features/CardsStore/hooks/index.tsx index 55b8bd42..c82a02bb 100644 --- a/src/features/CardsStore/hooks/index.tsx +++ b/src/features/CardsStore/hooks/index.tsx @@ -38,12 +38,7 @@ export const useBankCards = () => { .then(fetchCards) ) - const onDeleteCard = async (cardId: string) => { - await deleteCard(cardId).then(() => { - fetchCards() - toggleInfoModal() - }) - } + const onDeleteCard = (cardId: string) => deleteCard(cardId).then(fetchCards) const { isFetching, request: handleCardDelete } = useRequest(onDeleteCard) const onSetDefaultCard = (cardId: string) => {