UPDATE: Style ResultsPage;

UPDATE: Improve components;
This commit is contained in:
Chris-1010
2025-02-22 20:23:24 +00:00
parent 12d9f3660a
commit cd7ea461a8
10 changed files with 243 additions and 117 deletions

View File

@@ -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}

View File

@@ -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 },