Merge branch 'code-625' of _OKE5H2PQKOUfzFFDuD4FA/default/CODE/gitness (#183)

This commit is contained in:
Calvin Lee 2023-07-11 19:35:02 +00:00 committed by Harness
commit 0b6403c902
4 changed files with 12 additions and 4 deletions

View File

@ -59,7 +59,9 @@ export default function RepositoriesListing() {
useEffect(() => {
setSearchTerm(undefined)
updateQueryParams({ page: page.toString() })
if (page > 1) {
updateQueryParams({ page: page.toString() })
}
}, [space, setPage]) // eslint-disable-line react-hooks/exhaustive-deps
const columns: Column<TypesRepository>[] = useMemo(

View File

@ -44,7 +44,9 @@ export function RepositoryBranchesContent({ repoMetadata }: Pick<GitInfoProps, '
})
useEffect(() => {
updateQueryParams({ page: page.toString() })
if (page > 1) {
updateQueryParams({ page: page.toString() })
}
}, [setPage]) // eslint-disable-line react-hooks/exhaustive-deps
useShowRequestError(error)

View File

@ -55,7 +55,9 @@ export function RepositoryTagsContent({ repoMetadata }: Pick<GitInfoProps, 'repo
})
useEffect(() => {
updateQueryParams({ page: page.toString() })
if (page > 1) {
updateQueryParams({ page: page.toString() })
}
}, [setPage]) // eslint-disable-line react-hooks/exhaustive-deps
useShowRequestError(error)

View File

@ -69,7 +69,9 @@ export default function Webhooks() {
lazy: !repoMetadata
})
useEffect(() => {
updateQueryParams({ page: page.toString() })
if (page > 1) {
updateQueryParams({ page: page.toString() })
}
}, [setPage]) // eslint-disable-line react-hooks/exhaustive-deps
const columns: Column<OpenapiWebhookType>[] = useMemo(