From 523638abbed58892b0841280c334046d686aec46 Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Thu, 5 Sep 2024 23:54:22 +0900 Subject: [PATCH] refactor: remove unnecessary dependency --- src/components/layout.tsx | 2 +- src/hooks/apis/paymentHistory.ts | 12 ++++++------ src/pages/process.tsx | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/layout.tsx b/src/components/layout.tsx index 4b56198..2954bbd 100644 --- a/src/components/layout.tsx +++ b/src/components/layout.tsx @@ -50,7 +50,7 @@ export default function Layout() { return () => { if (interval) clearInterval(interval) } - }, [waitingCount]) + }, [waitingCount, playSound]) return ( diff --git a/src/hooks/apis/paymentHistory.ts b/src/hooks/apis/paymentHistory.ts index 9f44483..9746f4f 100644 --- a/src/hooks/apis/paymentHistory.ts +++ b/src/hooks/apis/paymentHistory.ts @@ -8,6 +8,12 @@ import { useNavigate } from 'react-router-dom' import { ROUTE } from 'constants/path' import { getProcessCount, getWaitingCount } from 'utils/getAlarmCount' +interface PatchParameterType { + orderHistoryId: string + paymentHistoryId: string + status: string +} + function useGetWaitingOrder() { const [storeId] = useAtom(storeIdAtom) const [, setWaitingCount] = useAtom(waitingCountAtom) @@ -49,12 +55,6 @@ function usePatchPaymentHistory(tableNumber?: number) { const [, setModalShow] = useAtom(modalShowAtom) const [, setModalDetail] = useAtom(modalDetailAtom) - interface PatchParameterType { - orderHistoryId: string - paymentHistoryId: string - status: string - } - const { mutate } = useMutation({ mutationKey: ['patchPaymentHistory'], mutationFn: ({ orderHistoryId, paymentHistoryId, status }: PatchParameterType) => diff --git a/src/pages/process.tsx b/src/pages/process.tsx index 57f3f09..52895a7 100644 --- a/src/pages/process.tsx +++ b/src/pages/process.tsx @@ -5,7 +5,7 @@ import { useGetPaymentHistory } from 'hooks/apis/paymentHistory' import { useAtom } from 'jotai' import { Container, CardContainer, TabTitle, Loading } from 'styles/shared' import { processCountAtom } from 'utils/atom' -import { parseOrder, returnTotalPrice } from 'utils/order' +import { parseOrder } from 'utils/order' import { OrbitProgress } from 'react-loading-indicators' export default function ProcessMain() {