import { useQuery } from '@apollo/client'
import { GET_SITES, GET_SITE } from '../queries'

export function useSites() {
  return useQuery(GET_SITES, {
    fetchPolicy: 'cache-and-network',
  })
}

export function useSite(id: string) {
  return useQuery(GET_SITE, {
    variables: { id },
    skip: !id,
  })
}

