import useSWR from 'swr' ; import fetcher from './fetcher' ; export default function useSites < T > ( siteId ? ) { const { data , error } = useSWR ( `/api/get-site-from-site-id/?siteId=${ siteId }` , fetcher ) ; const response = data ; return { response , error , } ; }