|
@@ -74,7 +74,7 @@ const Plans = (props) => {
|
|
|
const fetchAndUpdatePlans = () => {
|
|
|
getPlansOfUser(userId, plansFound => {
|
|
|
setPlans(plansFound);
|
|
|
- if (setIsTranslationFabHidden) setIsTranslationFabHidden(plansFound.length === 0);
|
|
|
+ if (setIsTranslationFabHidden && plansFound.length > 0) setIsTranslationFabHidden(false);
|
|
|
if (addThingsToTranslate) {
|
|
|
addThingsToTranslate(plansFound.filter(plan => !(plan.hasDate && new Date(plan.date).setHours(0, 0, 0, 0) < new Date().setHours(0, 0, 0, 0))) // plan is not in past
|
|
|
.map(plan => plan.title)); // add each plan's title to thingsToTranslate
|