mirror of
https://github.com/harness/drone.git
synced 2025-05-21 11:29:52 +08:00
fix: [code-625]: fix url params on repo listing page
This commit is contained in:
parent
f8092fe117
commit
17f96a5c3a
@ -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(
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user