mirror of https://github.com/halo-dev/halo
14 lines
337 B
TypeScript
14 lines
337 B
TypeScript
![]() |
import { apiClient } from "@/utils/api-client";
|
||
|
import { useQuery } from "@tanstack/vue-query";
|
||
|
|
||
|
export function useDashboardStats() {
|
||
|
const { data } = useQuery({
|
||
|
queryKey: ["dashboard-stats"],
|
||
|
queryFn: async () => {
|
||
|
const { data } = await apiClient.stats.getStats();
|
||
|
return data;
|
||
|
},
|
||
|
});
|
||
|
return { data };
|
||
|
}
|