mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-04-19 19:01:19 +00:00
Revert
This commit is contained in:
parent
2e415a2524
commit
c622a15b89
@ -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,
|
||||
});
|
||||
};
|
@ -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,
|
||||
});
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user