Skip to content

Commit

Permalink
Update page.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron-1303 authored Jul 10, 2024
1 parent 1a5759c commit d5e4b05
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/student/restaurant/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default function Component() {



const [menuItems, setMenuItems] = useState([]);
const [menuItems1, setMenuItems1] = useState([]);
const [searchTerm, setSearchTerm] = useState("");
const [filteredItems, setFilteredItems] = useState([]);
const router = useRouter();
Expand All @@ -77,7 +77,7 @@ export default function Component() {
);

if (selectedRestaurant) {
setMenuItems(selectedRestaurant.menu);
setMenuItems1(selectedRestaurant.menu);
setFilteredItems(selectedRestaurant.menu);
setRestaurantName(selectedRestaurant.name);
} else {
Expand All @@ -94,7 +94,7 @@ export default function Component() {
item.description.toLowerCase().includes(searchTerm.toLowerCase())
),
);
}, [searchTerm, menuItems]);
}, [searchTerm, menuItems1]);

const handleSearch = (e) => {
setSearchTerm(e.target.value);
Expand Down

0 comments on commit d5e4b05

Please sign in to comment.