const fetcher = (url) =>
axios
.get(url, { headers: { Authorization: "Bearer " + auth.token } })
.then((res) => res.data);
const { data, error } = useSWR(
`http://localhost:8000/api/v1/users/get-avatar`,
fetcher
);
if (error) console.log(error);
if (data) console.log(data);