import { useQuery } from '@tanstack/react-query' import type { BondResponse } from '@/shared/api/responses' import { getBond } from '../api/bondApi' export function useBond(secid: string) { return useQuery({ queryKey: ['bond', secid], queryFn: async () => { const res = await getBond(secid) return res.data }, staleTime: 900_000, }) }