Skip to content

Commit

Permalink
refactor: remove unnecessary dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
iOdiO89 committed Sep 5, 2024
1 parent 6864dac commit 523638a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default function Layout() {
return () => {
if (interval) clearInterval(interval)
}
}, [waitingCount])
}, [waitingCount, playSound])

return (
<Container>
Expand Down
12 changes: 6 additions & 6 deletions src/hooks/apis/paymentHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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) =>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/process.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 523638a

Please sign in to comment.