diff options
author | Anton Tananaev <anton@traccar.org> | 2023-09-04 10:53:05 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-09-04 10:53:05 -0700 |
commit | 9a59d6524c45d5542433302a498f9ada4e45e806 (patch) | |
tree | b779287db9104054ca5fbecf9f6218b2db46d8fe /modern/src/login | |
parent | 63eaa20047613c872979e2894fbdb5a0caab31f7 (diff) | |
download | trackermap-web-9a59d6524c45d5542433302a498f9ada4e45e806.tar.gz trackermap-web-9a59d6524c45d5542433302a498f9ada4e45e806.tar.bz2 trackermap-web-9a59d6524c45d5542433302a498f9ada4e45e806.zip |
Migrate to DayJs from moment
Diffstat (limited to 'modern/src/login')
-rw-r--r-- | modern/src/login/LoginPage.jsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modern/src/login/LoginPage.jsx b/modern/src/login/LoginPage.jsx index a177505c..73104def 100644 --- a/modern/src/login/LoginPage.jsx +++ b/modern/src/login/LoginPage.jsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import moment from 'moment'; +import dayjs from 'dayjs'; import { useMediaQuery, InputLabel, Select, MenuItem, FormControl, Button, TextField, Link, Snackbar, IconButton, Tooltip, LinearProgress, Box, } from '@mui/material'; @@ -72,7 +72,7 @@ const LoginPage = () => { if (nativeEnvironment) { let token = ''; try { - const expiration = moment().add(6, 'months').toISOString(); + const expiration = dayjs().add(6, 'months').toISOString(); const response = await fetch('/api/session/token', { method: 'POST', body: new URLSearchParams(`expiration=${expiration}`), |