mirror of
https://github.com/rjNemo/meal_planner
synced 2026-06-12 05:16:47 +00:00
[bug]: fix error when unauthenticated user renders page
This commit is contained in:
parent
a07c91a332
commit
a1605dadc6
2 changed files with 7 additions and 1 deletions
6
jsconfig.json
Normal file
6
jsconfig.json
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"baseUrl": "src"
|
||||||
|
},
|
||||||
|
"include": ["src"]
|
||||||
|
}
|
||||||
|
|
@ -44,7 +44,7 @@ export const MealController = ({ meal, getMeal, getRandomMeal }) => {
|
||||||
if (idMeal !== "52837" && isAuthenticated) {
|
if (idMeal !== "52837" && isAuthenticated) {
|
||||||
fb.isFav(user.email, idMeal).then((res) => setIsFav(res));
|
fb.isFav(user.email, idMeal).then((res) => setIsFav(res));
|
||||||
}
|
}
|
||||||
}, [user.email, fb, idMeal, isAuthenticated]);
|
}, [user, fb, idMeal, isAuthenticated]);
|
||||||
|
|
||||||
const item = {
|
const item = {
|
||||||
mealName: strMeal,
|
mealName: strMeal,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue