File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
packages/web/src/app/[domain]/repos Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
1010### Changed
1111- Bake Sourcebot version into code rather than relying on build arg. [ #680 ] ( https://github.com/sourcebot-dev/sourcebot/pull/680 )
12+ - Fix issue with ` /repos ` page pagination. [ #689 ] ( https://github.com/sourcebot-dev/sourcebot/pull/689 )
1213
1314## [ 4.10.4] - 2025-12-18
1415
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ import { ReposTable } from "./components/reposTable";
66import { RepoIndexingJobStatus , Prisma } from "@sourcebot/db" ;
77import z from "zod" ;
88
9+ const numberSchema = z . coerce . number ( ) . int ( ) . positive ( ) ;
10+
911interface ReposPageProps {
1012 searchParams : Promise < {
1113 page ?: string ;
@@ -17,12 +19,15 @@ interface ReposPageProps {
1719 } > ;
1820}
1921
20- export default async function ReposPage ( { searchParams } : ReposPageProps ) {
21- const params = await searchParams ;
22+ export default async function ReposPage ( props : ReposPageProps ) {
23+ const params = await props . searchParams ;
24+
25+ console . log ( 'asdf:' ) ;
26+ console . log ( z . coerce . number ( ) . int ( ) . safeParse ( params . page ) . error ) ;
2227
2328 // Parse pagination parameters with defaults
24- const page = z . number ( ) . int ( ) . positive ( ) . safeParse ( params . page ) . data ?? 1 ;
25- const pageSize = z . number ( ) . int ( ) . positive ( ) . safeParse ( params . pageSize ) . data ?? 5 ;
29+ const page = numberSchema . safeParse ( params . page ) . data ?? 1 ;
30+ const pageSize = numberSchema . safeParse ( params . pageSize ) . data ?? 5 ;
2631
2732 // Parse filter parameters
2833 const search = z . string ( ) . optional ( ) . safeParse ( params . search ) . data ?? '' ;
You can’t perform that action at this time.
0 commit comments