Skip to content

Commit

Permalink
some final changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Anshpatel2434 committed Jul 2, 2024
1 parent d11bd25 commit dd1a698
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/Components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Navbar = () => {

const handleKey = (e: React.KeyboardEvent<HTMLInputElement>) => {
if (e.key === "Enter") {
searchFurniture(search);
searchFurniture();
}
};

Expand All @@ -29,8 +29,8 @@ const Navbar = () => {
setSearch(e.target.value);
};

const searchFurniture = (value: string) => {
navigate(`/search/${value}`);
const searchFurniture = () => {
navigate(`/`);
};

const toggleMobileMenu = () => {
Expand Down Expand Up @@ -63,7 +63,7 @@ const Navbar = () => {
onKeyDown={handleKey}
/>
<button
onClick={() => searchFurniture(search)}
onClick={() => searchFurniture()}
className="bg-blue-700 h-10 w-16 flex items-center justify-center border-2 border-gray-600 rounded-r-lg"
>
<IoSearch size={24} className="text-white" />
Expand Down

0 comments on commit dd1a698

Please sign in to comment.