Skip to content

Commit

Permalink
perf(map): set default time to pi day
Browse files Browse the repository at this point in the history
  • Loading branch information
NoamGaash committed Sep 24, 2024
1 parent d70776b commit 5dc6706
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")

Check failure on line 44 in src/pages/timeBasedMap/index.tsx

View workflow job for this annotation

GitHub Actions / local-tests

Replace `"2023-03-14T15:00:00Z"` with `'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 5dc6706

Please sign in to comment.