Change default view to week

This commit is contained in:
adam-skowronek 2023-01-08 20:22:13 +01:00
parent 57d0c9bd55
commit b4d07993ba

View File

@ -1,4 +1,4 @@
import { Calendar, Views } from 'react-big-calendar'
import { Calendar, View, Views } from 'react-big-calendar'
import { useCallback, useState } from 'react'
import { useMutation, useQuery } from 'react-query'
import { useParams } from 'react-router-dom'
@ -26,7 +26,7 @@ const SupervisorSchedule = () => {
resource: any
}[]
>([])
const [view, setView] = useState(Views.MONTH)
const [view, setView] = useState<View>(Views.WEEK)
const onView = useCallback((newView: any) => setView(newView), [setView])
useQuery(['availability'], () => getAvailabilityForCoordinator(Number(id)), {