import { updateUnit } from 'Actions/actions' import React from 'react' import { useDispatch, useSelector } from 'react-redux' import { defaultUnitsSelector } from 'Selectors/analyseSelectors' import './PeriodSwitch.css' export default function PeriodSwitch() { const dispatch = useDispatch() const currentUnit = useSelector(defaultUnitsSelector)[0] let units = ['€/mois', '€/an'] return ( {units.map(unit => ( ))} ) }