mirror of
https://github.com/R0m1k3/CollectFlow.git
synced 2026-10-12 09:46:56 +02:00
feat: implement infinite scrolling and background data loading for the product grid component
This commit is contained in:
1 parent
f70249555e
commit
4dfdcc1144
4 files changed
+47
-10
No files matched your search
@@ -17,6 +17,8 @@ export async function GET(request: NextRequest) {
|
||||
|
||||
const page = parseInt(searchParams.get("page") ?? "0", 10);
|
||||
const pageSize = parseInt(searchParams.get("pageSize") ?? "200", 10);
|
||||
const offsetRaw = searchParams.get("offset");
|
||||
const offset = offsetRaw ? parseInt(offsetRaw, 10) : undefined;
|
||||
const search = searchParams.get("search") ?? undefined;
|
||||
const gamme = searchParams.get("gamme") ?? undefined;
|
||||
const code3 = searchParams.get("code3") ?? undefined;
|
||||
@@ -26,6 +28,7 @@ export async function GET(request: NextRequest) {
|
||||
codeFournisseur,
|
||||
page: isNaN(page) ? 0 : page,
|
||||
pageSize: isNaN(pageSize) ? 200 : pageSize,
|
||||
offset: offset !== undefined && !isNaN(offset) ? offset : undefined,
|
||||
search,
|
||||
gamme: gamme || null,
|
||||
code3: code3 || null,
|
||||
|
||||
Reference in new issue
Block a user