Skip to content

Commit

Permalink
chore: code cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
turban committed Sep 28, 2023
1 parent b79ce3e commit 71ea5e8
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/components/periods/PeriodSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ const PeriodSelect = ({
periodType,
}) => {
const [year, setYear] = useState(getYear(period?.startDate || lastDate))
// const [periods, setPeriods] = useState()
const prevYear = usePrevious(year)
// const prevPeriods = usePrevious(periods)

// Set periods when periodType or year changes
/* eslint-disable react-hooks/exhaustive-deps */
Expand Down Expand Up @@ -69,29 +67,6 @@ const PeriodSelect = ({
[year, firstDate, lastDate]
)

// Set periods when periodType or year changes
/*
useEffect(() => {
if (periodType) {
setPeriods(
getFixedPeriodsByType({
periodType,
year,
firstDate,
lastDate,
})
)
}
}, [periodType, year, firstDate, lastDate])
// Set saved map period
useEffect(() => {
if (!periodType && period) {
setPeriods([period])
}
}, [periodType, period])
*/

// Autoselect most recent period
useEffect(() => {
if (!period && periods) {
Expand Down

0 comments on commit 71ea5e8

Please sign in to comment.