feat(SW-2622): pass language to guarantee booking

This commit is contained in:
Michael Zetterberg
2025-05-06 13:53:13 +02:00
parent 1679e1d65d
commit b720a894fd
2 changed files with 14 additions and 2 deletions

View File

@@ -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) => {