feat(SW-2622): pass language to guarantee booking
This commit is contained in:
@@ -4,6 +4,8 @@ import { useRef } from "react"
|
||||
|
||||
import { trpc } from "@/lib/trpc/client"
|
||||
|
||||
import useLang from "@/hooks/useLang"
|
||||
|
||||
import type { BookingStatusEnum } from "@/constants/booking"
|
||||
|
||||
export function useHandleBookingStatus({
|
||||
@@ -19,10 +21,14 @@ export function useHandleBookingStatus({
|
||||
retryInterval: number
|
||||
enabled: boolean
|
||||
}) {
|
||||
const lang = useLang()
|
||||
const retries = useRef(0)
|
||||
|
||||
const query = trpc.booking.status.useQuery(
|
||||
{ refId: refId ?? "" },
|
||||
{
|
||||
lang,
|
||||
refId: refId ?? "",
|
||||
},
|
||||
{
|
||||
enabled,
|
||||
refetchInterval: (query) => {
|
||||
|
||||
Reference in New Issue
Block a user