Skip to content

Commit

Permalink
🔧 Set horizontal thresholds in store
Browse files Browse the repository at this point in the history
  • Loading branch information
kunkoala committed Oct 7, 2024
1 parent d7ac19c commit 3431d24
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {useTranslation} from 'react-i18next';
import {LineChartSettings} from './LineChartSettingsComponents/LineChartSettings';
import {Dictionary} from 'util/util';
import {HorizontalThreshold} from 'types/horizontalThreshold';
import {setHorizontalYAxisThresholds} from 'store/UserPreferenceSlice';

export default function LineChartContainer() {
const {t} = useTranslation('backend');
Expand All @@ -38,6 +39,11 @@ export default function LineChartContainer() {
return t(`infection-states.${selectedCompartment}`);
}, [selectedCompartment, t]);

// Set horizontal thresholds in store
useEffect(() => {
dispatch(setHorizontalYAxisThresholds(horizontalThresholds));
}, [horizontalThresholds, dispatch]);

// Set selected date in store
useEffect(() => {
dispatch(selectDate(selectedDate));
Expand Down

0 comments on commit 3431d24

Please sign in to comment.