-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c930ded
commit 7db4ff6
Showing
4 changed files
with
124 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { useQuery } from 'react-query'; | ||
|
||
import { axiosRequest } from 'src/utils/axiosRequest'; | ||
import type { Filter } from 'types/mediatheque.type'; | ||
|
||
async function getOnlyPelicoMediatheque(params: { filters: Array<Filter[]> }) { | ||
const { filters } = params; | ||
|
||
return ( | ||
await axiosRequest({ | ||
method: 'POST', | ||
baseURL: '/api', | ||
url: '/mediatheque/pelico', | ||
data: { | ||
filters: filters, | ||
}, | ||
}) | ||
).data; | ||
} | ||
|
||
export const useGetOnlyPelicoMediatheque = (filters: Array<Filter[]>) => { | ||
return useQuery(['OnlyPelicoMediatheque', filters], () => getOnlyPelicoMediatheque({ filters })); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters