This commit is contained in:
austinkelsay 2024-08-02 13:56:05 -05:00
parent 2e415a2524
commit c622a15b89
2 changed files with 0 additions and 28 deletions

View File

@ -1,14 +0,0 @@
import { useQuery } from '@tanstack/react-query';
import axios from 'axios';
const fetchCourses = async () => {
const { data } = await axios.get('/api/courses');
return data;
};
export const useCourses = () => {
return useQuery({
queryKey: ['courses'],
queryFn: fetchCourses,
});
};

View File

@ -1,14 +0,0 @@
import { useQuery } from '@tanstack/react-query';
import axios from 'axios';
const fetchResources = async () => {
const { data } = await axios.get('/api/resources');
return data;
};
export const useResources = () => {
return useQuery({
queryKey: ['resources'],
queryFn: fetchResources,
});
};