diff --git a/frontend/app/(cms)/pollen/components/PollenCalendar.tsx b/frontend/app/(cms)/pollen/components/PollenCalendar.tsx index de93f818..735f3dc6 100644 --- a/frontend/app/(cms)/pollen/components/PollenCalendar.tsx +++ b/frontend/app/(cms)/pollen/components/PollenCalendar.tsx @@ -7,13 +7,13 @@ import DateInput from "@/app/(cms)/pollen/components/DateInput" import MultiChart from "@/app/(cms)/pollen/components/MultiChart" const PollenCalendar = memo(function PollenCalendar({ pollenData }: { pollenData: PollenData[] }) { - const [showingDateFilter, showDateFilter] = useState(false) + const [showsDateFilter, setShowsDateFilter] = useState(false) const [dateLowerLimit, setDateLowerLimit] = useState(dayjs("2024-11-28").valueOf()) const [dateUpperLimit, setDateUpperLimit] = useState(dayjs("2024-12-2").valueOf()) - const [showingPollenTypeFilter, showPollenTypeFilter] = useState(false) + const [showsPollenTypeFilter, setShowsPollenTypeFilter] = useState(false) const [allPollenTypes, setAllPollenTypes] = useState([]) - const [displayedPollenTypes, displayPollenTypes] = useState([]) + const [displayedPollenTypes, setDisplayedPollenTypes] = useState([]) const [formattedPollenData, setFormattedPollenData] = useState(null) const [filteredPollenData, setFilteredPollenData] = useState(null) @@ -24,7 +24,7 @@ const PollenCalendar = memo(function PollenCalendar({ pollenData }: { pollenData const allPollenNames = formatted.pollenTypes.map((pollenType) => pollenType) setAllPollenTypes(allPollenNames) - displayPollenTypes(allPollenNames) + setDisplayedPollenTypes(allPollenNames) }, [pollenData]) useEffect(() => { @@ -54,14 +54,14 @@ const PollenCalendar = memo(function PollenCalendar({ pollenData }: { pollenData
- {allPollenTypes && showingPollenTypeFilter && ( + {allPollenTypes && showsPollenTypeFilter && ( )}
@@ -70,10 +70,10 @@ const PollenCalendar = memo(function PollenCalendar({ pollenData }: { pollenData
- {showingDateFilter && ( + {showsDateFilter && (