Skip to content

Commit

Permalink
search is work in all users name ans email
Browse files Browse the repository at this point in the history
  • Loading branch information
rezwanhossen committed Jun 11, 2024
1 parent 2e87023 commit 76065bf
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/Dashbord/AdminPages/Allusers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ const Allusers = () => {
const asioxSec = useAxiosSecqur();
const [search, setsearch] = useState("");

// const {
// data: users = [],
// isLoading,
// refetch,
// } = useQuery({
// queryKey: ["users", search],
// queryFn: async () => {
// const { data } = await asioxSec.get(`/all-users?search=${search}`);
// return data;
// },
// });
const {
data: users = [],
isLoading,
refetch,
} = useQuery({
queryKey: ["users", search],
queryFn: async () => {
const { data } = await asioxSec.get(`/all-users?search=${search}`);
return data;
},
});

const handelrol = (id) => {
asioxSec.patch(`/users/admin/${id}`).then((res) => {
Expand Down

0 comments on commit 76065bf

Please sign in to comment.