import { useContext } from 'react' import { AppContext, ACTIONS } from '../context/appStore' import Form from 'react-bootstrap/Form' export default function RangeSelect() { const { state, dispatch } = useContext(AppContext) function getValue() { const { multipleDays } = state if (multipleDays === null || multipleDays === undefined) { return null } if (multipleDays === true) { return 'multiple' } return 'single' } return ( Willst du einen odere mehrere Tage buchen? dispatch({ type: ACTIONS.SET_MULTIPLE_DAYS, payload: false }) } /> dispatch({ type: ACTIONS.SET_MULTIPLE_DAYS, payload: true }) } /> ) }