From ff9ff3d987406ac35ac744bd594b7d7d533e34e2 Mon Sep 17 00:00:00 2001 From: holybasil Date: Wed, 19 Feb 2025 18:12:03 +0800 Subject: [PATCH 1/3] fix: no scrollRequest in window --- src/hooks/useRollupInfo.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hooks/useRollupInfo.ts b/src/hooks/useRollupInfo.ts index cc64a3ff5..626ebaccd 100644 --- a/src/hooks/useRollupInfo.ts +++ b/src/hooks/useRollupInfo.ts @@ -1,6 +1,7 @@ import useSWR from "swr" import { fetchBatchBlocksUrl, fetchBatchDetailUrl, fetchChunkBlocksUrl, fetchChunkListUrl, fetchLastBatchIndexesUrl } from "@/apis/rollupscan" +import { scrollRequest } from "@/utils/request" export enum BLOCK_LIST_TYPE { BATCH = "Batch", From 5437310c4b76bd7323c152a262422f7126a664cd Mon Sep 17 00:00:00 2001 From: holybasil Date: Wed, 19 Feb 2025 18:18:15 +0800 Subject: [PATCH 2/3] fix: next page --- src/app/rollupscan/index/Table.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/rollupscan/index/Table.tsx b/src/app/rollupscan/index/Table.tsx index a64ee4e49..9023b5899 100644 --- a/src/app/rollupscan/index/Table.tsx +++ b/src/app/rollupscan/index/Table.tsx @@ -155,9 +155,9 @@ const RollupTable = function RollupTable(props) { } const handleChangePage = (e, newPage) => { - searchParams.set("page", newPage) - // setSearchParams(searchParams); - router.push(`${pathname}?${searchParams.toString()}}`) + const params = new URLSearchParams(searchParams.toString()) + params.set("page", newPage) + router.push(`${pathname}?${params.toString()}}`) onPaginationChange({ page: +searchParams.get("page"), pageSize: +searchParams.get("per_page"), From 825af0c8626487b0a41ab1c2c211250e9edffc55 Mon Sep 17 00:00:00 2001 From: holybasil Date: Wed, 19 Feb 2025 18:24:59 +0800 Subject: [PATCH 3/3] fix: width --- src/app/rollupscan/batch/[batchIndex]/blocks/page.tsx | 1 + .../rollupscan/batch/[batchIndex]/chunk/[chunkIndex]/page.tsx | 1 + src/app/rollupscan/batch/[batchIndex]/chunks/page.tsx | 1 + 3 files changed, 3 insertions(+) diff --git a/src/app/rollupscan/batch/[batchIndex]/blocks/page.tsx b/src/app/rollupscan/batch/[batchIndex]/blocks/page.tsx index 7bafe304e..836fd1c40 100644 --- a/src/app/rollupscan/batch/[batchIndex]/blocks/page.tsx +++ b/src/app/rollupscan/batch/[batchIndex]/blocks/page.tsx @@ -26,6 +26,7 @@ const Blocks = () => { { {