88} from '@/components/ui/breadcrumb'
99
1010import { SITE_NAME } from '@/lib/consts'
11- import type { Metadata } from 'next'
11+ import type { Metadata , Route } from 'next'
1212import { LibrarySelector } from '@/components/dashboard/LibrarySelector'
1313import { DateRangeSelector } from '@/components/dashboard/DateRangeSelector'
1414import { IsLoggedIn } from '@/lib/firebase/firebase'
@@ -69,7 +69,7 @@ export default async function DashboardPage({
6969 sp . set ( 'from' , from )
7070 sp . set ( 'to' , to )
7171
72- redirect ( '?' + sp . toString ( ) , RedirectType . replace )
72+ redirect ( ( '?' + sp . toString ( ) ) as Route , RedirectType . replace )
7373 }
7474
7575 const libsRes = await getListLibraries ( { limit : 5 } )
@@ -86,7 +86,7 @@ export default async function DashboardPage({
8686 const sp = new URLSearchParams ( p )
8787 sp . set ( 'library_id' , libraryID )
8888
89- redirect ( './?' + sp . toString ( ) , RedirectType . replace )
89+ redirect ( ( './?' + sp . toString ( ) ) as Route , RedirectType . replace )
9090 }
9191
9292 const fromDate = parse ( from , 'dd-MM-yyyy' , new Date ( ) )
@@ -102,7 +102,7 @@ export default async function DashboardPage({
102102 if ( range . from ) sp . set ( 'from' , format ( range . from , 'dd-MM-yyyy' ) )
103103 if ( range . to ) sp . set ( 'to' , format ( range . to , 'dd-MM-yyyy' ) )
104104
105- redirect ( './?' + sp . toString ( ) , RedirectType . replace )
105+ redirect ( ( './?' + sp . toString ( ) ) as Route , RedirectType . replace )
106106 }
107107
108108 const start = startOfDay ( parse ( from , 'dd-MM-yyyy' , new Date ( ) ) ) . toJSON ( )
0 commit comments