fix: expired check 2.0?

This commit is contained in:
Aarnav Tale 2024-06-02 14:03:25 -04:00
parent f0f8a6f01b
commit 2797525969
No known key found for this signature in database
3 changed files with 3 additions and 0 deletions

View File

@ -49,6 +49,7 @@ export default function Page() {
useLiveData({ interval: 1000 })
const expired = machine.expiry === '0001-01-01 00:00:00'
|| machine.expiry === '0001-01-01T00:00:00Z'
? false
: new Date(machine.expiry).getTime() < Date.now()

View File

@ -17,6 +17,7 @@ interface Props {
export default function MachineRow({ machine, routes, magic }: Props) {
const expired = machine.expiry === '0001-01-01 00:00:00'
|| machine.expiry === '0001-01-01T00:00:00Z'
? false
: new Date(machine.expiry).getTime() < Date.now()

View File

@ -23,6 +23,7 @@ export default function Menu({ machine, routes, magic }: MenuProps) {
const routesState = useState(false)
const expired = machine.expiry === '0001-01-01 00:00:00'
|| machine.expiry === '0001-01-01T00:00:00Z'
? false
: new Date(machine.expiry).getTime() < Date.now()