import { useSuspenseQuery } from '@tanstack/react-query'
import { getConfig } from '@/lib/config'

export function useConfig() {
  const { data } = useSuspenseQuery({
    queryKey: ['config'],
    queryFn: () => getConfig(),
    staleTime: Infinity,
  })

  return data
}
