File tree 2 files changed +1
-4
lines changed
2 files changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,9 @@ export default async function Page({
15
15
} : {
16
16
searchParams ?: {
17
17
query ?: string ;
18
- page ?: string ;
19
18
} ;
20
19
} ) {
21
20
const query = searchParams ?. query || '' ;
22
- const currentPage = Number ( searchParams ?. page ) || 1 ;
23
21
24
22
const customers = await fetchFilteredCustomers ( query ) ;
25
23
@@ -28,7 +26,7 @@ export default async function Page({
28
26
< div className = "flex w-full items-center justify-between" >
29
27
< h1 className = { `${ lusitana . className } text-2xl ${ darkTheme . title } ` } > Customers</ h1 >
30
28
</ div >
31
- < Suspense key = { query + currentPage } fallback = { < InvoicesTableSkeleton /> } >
29
+ < Suspense key = { query } fallback = { < InvoicesTableSkeleton /> } >
32
30
< Table customers = { customers } />
33
31
</ Suspense >
34
32
</ div >
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ export default function Search({ placeholder }: { placeholder: string }) {
12
12
13
13
const handleSearch = useDebouncedCallback ( ( term ) => {
14
14
const params = new URLSearchParams ( searchParams ) ;
15
- params . set ( 'page' , '1' ) ;
16
15
if ( term ) {
17
16
params . set ( 'query' , term ) ;
18
17
} else {
You can’t perform that action at this time.
0 commit comments