import { useQuery } from '@tanstack/react-query'
import { getMyPurchaseRequests } from '../api/b2bApi'

export function useMyPurchaseRequests() {
  return useQuery({
    queryKey: ['b2b', 'purchase-requests'],
    queryFn: () => getMyPurchaseRequests(),
    staleTime: 30_000,
  })
}
