adding in stuff to make search work but still testing and stuff

This commit is contained in:
talksik
2022-03-18 12:37:39 -04:00
parent 726ab29b64
commit 1ff61bf91d
12 changed files with 225 additions and 64 deletions
@@ -0,0 +1,24 @@
import { $searchQuery } from "../../../controller/recoil";
import { useEffect } from "react";
import { useSearch } from "../../../controller";
export default function Search() {
const { data: searchResultsResponse, isLoading, isError } = useSearch();
useEffect(() => {}, []);
if (!searchResultsResponse?.users) {
return (
<span className="text-white">
no results. please try someone's email or name.
</span>
);
}
return (
<div>
{searchResultsResponse.users?.map((user) => {
return <span>{user.name}</span>;
})}
</div>
);
}