Using useSWR to retrieve data from an endpoint, but I am getting this error (I want to only retrieve the data onclick)