fixed search weirdness and eatery name works now

This commit is contained in:
Ava DeCroix
2023-05-02 18:36:04 -04:00
parent e423c9b86f
commit 6c30a3e0eb
2 changed files with 4 additions and 2 deletions

View File

@@ -133,6 +133,7 @@ const changeSearchHandler = evt => {
const submitSearchHandler = evt => {
evt.preventDefault();
setSearchItems([]);
console.log(search_term)
console.log(net_id)
Axios.post("http://3.219.93.142:8000/api/menu_search",
@@ -312,7 +313,7 @@ color: 'main',
/>
</TableCell>
<TableCell> {searchitem.eatery_id}</TableCell>
<TableCell> {searchitem.eatery_name}</TableCell>
<TableCell> {searchitem.item_name}</TableCell>
<TableCell> {searchitem.serving_size}</TableCell>
</TableRow>

View File

@@ -178,7 +178,7 @@ const net_id = ReactSession.get("net_id");
//Send sums to results if it is Saturday
const sendResults = () => {
var day = planDay();
if (day === 7):
if (day === 7){
Axios.post('http://3.219.93.142:8000/api/results',
{
net_id: ReactSession.get("net_id"),
@@ -198,6 +198,7 @@ const net_id = ReactSession.get("net_id");
console.log(response);
});
}
}