fix: handle 0001-01-01 00:00:00 as the no-expiry timestamp
This commit is contained in:
parent
937fa6f6fa
commit
3bd5cc99aa
3 changed files with 10 additions and 3 deletions
|
|
@ -48,7 +48,10 @@ export default function Page() {
|
|||
const { machine, magic, routes } = useLoaderData<typeof loader>()
|
||||
useLiveData({ interval: 1000 })
|
||||
|
||||
const expired = new Date(machine.expiry).getTime() < Date.now()
|
||||
const expired = machine.expiry === '0001-01-01 00:00:00'
|
||||
? false
|
||||
: new Date(machine.expiry).getTime() < Date.now()
|
||||
|
||||
const tags = [
|
||||
...machine.forcedTags,
|
||||
...machine.validTags,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue