feat(backend): SingleTheme-pagina geïmplementeerd
This commit is contained in:
parent
a33ec6c452
commit
34f980d690
7 changed files with 137 additions and 49 deletions
|
@ -22,6 +22,18 @@ export function useGetLearningPathQuery(
|
|||
})
|
||||
}
|
||||
|
||||
export function useGetAllLearningPathsByThemeQuery(
|
||||
theme: MaybeRefOrGetter<string>
|
||||
): UseQueryReturnType<LearningPath[], Error> {
|
||||
return useQuery({
|
||||
queryKey: [LEARNING_PATH_KEY, "getAllByTheme", theme],
|
||||
queryFn: () => {
|
||||
return learningPathController.getAllByTheme(toValue(theme))
|
||||
},
|
||||
enabled: () => Boolean(toValue(theme)),
|
||||
})
|
||||
}
|
||||
|
||||
export function useSearchLearningPathQuery(
|
||||
query: MaybeRefOrGetter<string>
|
||||
): UseQueryReturnType<LearningPath[], Error> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue