upd
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user