fixing bugs with item notification radius

This commit is contained in:
jackiettran
2025-11-20 15:01:15 -05:00
parent 413ac6b6e2
commit 83872fe039
11 changed files with 842 additions and 680 deletions

View File

@@ -89,8 +89,8 @@ const Navbar: React.FC = () => {
navigate("/");
};
const handleSearch = (e: React.FormEvent) => {
e.preventDefault();
const handleSearch = (e?: React.FormEvent | React.MouseEvent) => {
e?.preventDefault();
const params = new URLSearchParams();
if (searchFilters.search.trim()) {
@@ -142,7 +142,7 @@ const Navbar: React.FC = () => {
<div className="collapse navbar-collapse" id="navbarNav">
<div className="d-flex align-items-center w-100">
<div className="position-absolute start-50 translate-middle-x">
<form onSubmit={handleSearch}>
<div>
<div className="input-group" style={{ width: "520px" }}>
<input
type="text"
@@ -152,6 +152,11 @@ const Navbar: React.FC = () => {
onChange={(e) =>
handleSearchInputChange("search", e.target.value)
}
onKeyDown={(e) => {
if (e.key === "Enter") {
handleSearch(e);
}
}}
/>
<span
className="input-group-text text-muted"
@@ -171,12 +176,21 @@ const Navbar: React.FC = () => {
onChange={(e) =>
handleSearchInputChange("location", e.target.value)
}
onKeyDown={(e) => {
if (e.key === "Enter") {
handleSearch(e);
}
}}
/>
<button className="btn btn-outline-secondary" type="submit">
<button
className="btn btn-outline-secondary"
type="button"
onClick={handleSearch}
>
<i className="bi bi-search"></i>
</button>
</div>
</form>
</div>
</div>
<div className="ms-auto d-flex align-items-center">
<Link