mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 22:47:15 +01:00
add appStore and use router for booking
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React, { useContext, useState, useRef, useEffect } from 'react'
|
||||
import useSWR from 'swr'
|
||||
|
||||
import { WizardContext } from '../context/wizardStore'
|
||||
import { AppContext } from '../context/appStore'
|
||||
|
||||
import { DateUtils } from 'react-day-picker'
|
||||
import DayPickerInput from 'react-day-picker/DayPickerInput'
|
||||
@@ -19,7 +19,7 @@ import 'moment/locale/de'
|
||||
const fetcher = (path) => fetch(path).then((r) => r.json())
|
||||
|
||||
export default function DateSelect() {
|
||||
const { state, onChange } = useContext(WizardContext)
|
||||
const { state, onChange } = useContext(AppContext)
|
||||
const [range, setRange] = useState({
|
||||
form: state.startDate && new Date(state.startDate),
|
||||
to: state.endDate && new Date(state.endDate),
|
||||
|
||||
Reference in New Issue
Block a user