fix range
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
import {
|
||||
BookCopyIcon,
|
||||
CalendarClockIcon,
|
||||
DollarSignIcon,
|
||||
FileBadgeIcon,
|
||||
GraduationCap,
|
||||
LayoutDashboardIcon,
|
||||
ShieldUserIcon,
|
||||
ShoppingCartIcon,
|
||||
UploadIcon,
|
||||
UsersIcon
|
||||
} from 'lucide-react'
|
||||
@@ -31,7 +31,7 @@ const data = {
|
||||
{
|
||||
title: 'Histórico de compras',
|
||||
url: '/orders',
|
||||
icon: DollarSignIcon
|
||||
icon: ShoppingCartIcon
|
||||
}
|
||||
],
|
||||
navUser: [
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { Route } from './+types/route'
|
||||
|
||||
import { DateTime } from 'luxon'
|
||||
import { CalendarIcon, PlusCircleIcon, PlusIcon } from 'lucide-react'
|
||||
import { MeiliSearchFilterBuilder } from 'meilisearch-helper'
|
||||
import { Suspense, useState } from 'react'
|
||||
@@ -226,12 +227,11 @@ function useRangeParams() {
|
||||
}
|
||||
|
||||
const [rangeField, from_] = from.split(':')
|
||||
|
||||
return {
|
||||
rangeField,
|
||||
dateRange: {
|
||||
from: new Date(from_),
|
||||
to: new Date(to)
|
||||
from: DateTime.fromISO(from_).toJSDate(),
|
||||
to: DateTime.fromISO(to).toJSDate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user