mirror of
https://github.com/neosubhamoy/neodlp.git
synced 2026-07-09 17:14:32 +02:00
23 lines
601 B
TypeScript
23 lines
601 B
TypeScript
import { useQuery } from "@tanstack/react-query";
|
|
import { fetchAllDownloadStates, fetchAllKvPairs, fetchAllSettings } from "@/services/database";
|
|
|
|
export function useFetchAllDownloadStates() {
|
|
return useQuery({
|
|
queryKey: ['download-states'],
|
|
queryFn: () => fetchAllDownloadStates()
|
|
})
|
|
}
|
|
|
|
export function useFetchAllSettings() {
|
|
return useQuery({
|
|
queryKey: ['settings'],
|
|
queryFn: () => fetchAllSettings()
|
|
})
|
|
}
|
|
|
|
export function useFetchAllkVPairs() {
|
|
return useQuery({
|
|
queryKey: ['kv-pairs'],
|
|
queryFn: () => fetchAllKvPairs()
|
|
})
|
|
} |