Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Block Explorer UI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
Block Explorer UI
Commits
5eca5aaf
Commit
5eca5aaf
authored
5 months ago
by
Lukas
Browse files
Options
Downloads
Patches
Plain Diff
Redirect user to last page when trying to access unavailable page count
parent
ab373413
Branches
Branches containing commit
No related tags found
2 merge requests
!481
bring recent develop changes to mater to match the backend
,
!474
Lbudginas/#379 jump to page negative value bug
Pipeline
#109415
canceled
5 months ago
Stage: build
Stage: test
Stage: test-report-aggregate
Stage: cleanup
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pages/[accountName].tsx
+17
-1
17 additions, 1 deletion
pages/[accountName].tsx
with
17 additions
and
1 deletion
pages/[accountName].tsx
+
17
−
1
View file @
5eca5aaf
...
@@ -207,6 +207,22 @@ export default function Account() {
...
@@ -207,6 +207,22 @@ export default function Account() {
// eslint-disable-next-line react-hooks/exhaustive-deps
// eslint-disable-next-line react-hooks/exhaustive-deps
},
[
paramsState
]);
},
[
paramsState
]);
useEffect
(()
=>
{
if
(
router
.
query
.
page
&&
accountOperations
&&
(
Number
(
router
.
query
.
page
)
<=
0
||
Number
(
router
.
query
.
page
)
>
accountOperations
.
total_pages
)
)
{
router
.
replace
({
query
:
{
...
router
.
query
,
page
:
accountOperations
.
total_pages
,
},
});
}
},
[
router
,
accountOperations
]);
const
renderAccountDetailsView
=
()
=>
{
const
renderAccountDetailsView
=
()
=>
{
if
(
isMobile
)
{
if
(
isMobile
)
{
return
(
return
(
...
@@ -339,7 +355,7 @@ export default function Account() {
...
@@ -339,7 +355,7 @@ export default function Account() {
)
:
(
)
:
(
<
OperationsTable
<
OperationsTable
operations
=
{
convertOperationResultsToTableOperations
(
operations
=
{
convertOperationResultsToTableOperations
(
formattedAccountOperations
?.
operations_result
formattedAccountOperations
?.
operations_result
||
[]
)
}
)
}
unformattedOperations
=
{
convertOperationResultsToTableOperations
(
unformattedOperations
=
{
convertOperationResultsToTableOperations
(
accountOperations
?.
operations_result
||
[]
accountOperations
?.
operations_result
||
[]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment