fix: [code-657]: fix page issue

This commit is contained in:
calvin 2023-07-21 16:18:50 -06:00
parent baa4eb5ac9
commit 05c0c256c3

View File

@ -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()