schedule/src/hooks/useCfpRequest.js

8 lines
221 B
JavaScript
Raw Normal View History

2024-09-18 21:24:35 +03:00
import useSWR from 'swr';
const fetcher = (...args) => fetch(...args).then(res => res.json());
2024-09-19 12:57:24 +03:00
export default function useCfpRequest(path) {
2024-09-18 21:24:35 +03:00
return useSWR(import.meta.env.VITE_CFP_BASE_URL.concat(path), fetcher);
}