Add 12hrs option, fix linting issue

This commit is contained in:
Jackson Harper 2024-03-20 15:36:53 +08:00
parent 82ef57a36a
commit 59cc954618

View file

@ -396,10 +396,19 @@ export const buildQueryString = (
endDate = yesterday.endOf('day').toJSDate()
break
}
case 'last12hrs':
{
const ago = new Date()
ago.setHours(ago.getHours() - 12)
startDate = ago
}
break
case 'last24hrs':
const ago = new Date()
ago.setHours(ago.getHours() - 24)
startDate = ago
{
const ago = new Date()
ago.setHours(ago.getHours() - 24)
startDate = ago
}
break
case 'this week':
startDate = DateTime.local().startOf('week').toJSDate()