This commit is contained in:
2025-06-18 17:29:39 +05:00
parent 8a31c3ecfb
commit a6c7bda762
+3 -2
View File
@@ -7,6 +7,7 @@ import { useState } from "react";
import { useDebounce } from "@uidotdev/usehooks";
import { useQuery } from "@tanstack/react-query";
import api from "../utils/api";
import { User } from "../types/User";
function ClientsPage() {
const [limit, setLimit] = useState(10);
@@ -16,12 +17,12 @@ function ClientsPage() {
const { data: me } = useQuery({
queryKey: ["me"],
queryFn: () => api.get("auth/me").json<IUser>(),
queryFn: () => api.get("auth/me").json<User>(),
});
const { data: clients, isLoading } = useQuery({
queryKey: ["clients"],
queryFn: () => api.get("clients").json<IUser[]>(),
queryFn: () => api.get("clients").json<User[]>(),
enabled: !!me,
});