UPDATE: Style ResultsPage;
UPDATE: Improve components;
This commit is contained in:
@@ -15,7 +15,7 @@ const Button: React.FC<ButtonProps> = ({
|
||||
return (
|
||||
<button
|
||||
type={type}
|
||||
className={`${extraClasses} p-2 text-[1.5rem] text-white hover:text-purple-600 bg-black/30 hover:bg-black/80 rounded-md border border-gray-300 hover:border-purple-500 hover:border-b-4 hover:border-l-4 active:border-b-2 active:border-l-2 transition-all`}
|
||||
className={`${extraClasses} p-2 text-[1.5vw] text-white hover:text-purple-600 bg-black/30 hover:bg-black/80 rounded-md border border-gray-300 hover:border-purple-500 hover:border-b-4 hover:border-l-4 active:border-b-2 active:border-l-2 transition-all`}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
|
||||
@@ -3,8 +3,12 @@ import Input from "./Input";
|
||||
import { Search as SearchIcon } from "lucide-react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
const SearchBar: React.FC = () => {
|
||||
const [searchQuery, setSearchQuery] = useState("");
|
||||
interface SearchBarProps {
|
||||
value?: string;
|
||||
}
|
||||
|
||||
const SearchBar: React.FC<SearchBarProps> = ({ value = "" }) => {
|
||||
const [searchQuery, setSearchQuery] = useState(value);
|
||||
//const [debouncedQuery, setDebouncedQuery] = useState(searchQuery);
|
||||
const navigate = useNavigate();
|
||||
|
||||
@@ -21,7 +25,6 @@ const SearchBar: React.FC = () => {
|
||||
});
|
||||
|
||||
const data = await response.json();
|
||||
console.log("Search results:", data);
|
||||
|
||||
navigate("/results", {
|
||||
state: { searchResults: data, query: searchQuery },
|
||||
|
||||
Reference in New Issue
Block a user