From 05c0c256c3b2174fcd8cee7bac9d6260ea76bba9 Mon Sep 17 00:00:00 2001 From: calvin Date: Fri, 21 Jul 2023 16:18:50 -0600 Subject: [PATCH] fix: [code-657]: fix page issue --- web/src/pages/PullRequests/PullRequests.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/src/pages/PullRequests/PullRequests.tsx b/web/src/pages/PullRequests/PullRequests.tsx index 203181e40..ca5566a87 100644 --- a/web/src/pages/PullRequests/PullRequests.tsx +++ b/web/src/pages/PullRequests/PullRequests.tsx @@ -56,7 +56,9 @@ export default function PullRequests() { const [page, setPage] = usePageIndex(pageInit) useEffect(() => { - updateQueryParams({ page: page.toString() }) + if (page > 1) { + updateQueryParams({ page: page.toString() }) + } }, [setPage]) // eslint-disable-line react-hooks/exhaustive-deps const { repoMetadata, error, loading, refetch } = useGetRepositoryMetadata()