Skip to content

Commit

Permalink
perf(map): set default time to pi day (#885)
Browse files Browse the repository at this point in the history
  • Loading branch information
NoamGaash authored Sep 24, 2024
1 parent db0294f commit 6fba5ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pages/timeBasedMap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ interface Path {
vehicleRef: number
}

const fiveMinutesAgo = moment().subtract(5, 'minutes')
const fourMinutesAgo = moment(fiveMinutesAgo).add(1, 'minutes')
const defaultStart = moment('2023-03-14T15:00:00Z')
const defaultEnd = moment(defaultStart).add(1, 'minutes')

export default function TimeBasedMapPage() {
const [isExpanded, setIsExpanded] = useState<boolean>(false)
Expand All @@ -54,8 +54,8 @@ export default function TimeBasedMapPage() {
}

//TODO (another PR and another issue) load from url like in another pages.
const [from, setFrom] = useState(fiveMinutesAgo)
const [to, setTo] = useState(fourMinutesAgo)
const [from, setFrom] = useState(defaultStart)
const [to, setTo] = useState(defaultEnd)

const { locations, isLoading } = useVehicleLocations({
from,
Expand Down

0 comments on commit 6fba5ea

Please sign in to comment.