Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
24258d46
Commit
24258d46
authored
Oct 10, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable shallow navigation for blocks
parent
c1829e8d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
BlockDetails.tsx
ui/block/BlockDetails.tsx
+4
-2
Block.tsx
ui/pages/Block.tsx
+5
-1
No files found.
ui/block/BlockDetails.tsx
View file @
24258d46
...
@@ -52,8 +52,10 @@ const BlockDetails = () => {
...
@@ -52,8 +52,10 @@ const BlockDetails = () => {
const
handlePrevNextClick
=
React
.
useCallback
((
direction
:
'
prev
'
|
'
next
'
)
=>
{
const
handlePrevNextClick
=
React
.
useCallback
((
direction
:
'
prev
'
|
'
next
'
)
=>
{
const
increment
=
direction
===
'
next
'
?
+
1
:
-
1
;
const
increment
=
direction
===
'
next
'
?
+
1
:
-
1
;
const
url
=
link
(
'
block_index
'
,
{
id
:
String
(
Number
(
router
.
query
.
id
)
+
increment
)
});
const
nextId
=
String
(
Number
(
router
.
query
.
id
)
+
increment
);
router
.
push
(
url
,
undefined
,
{
shallow
:
true
});
const
url
=
link
(
'
block_index
'
,
{
id
:
nextId
});
router
.
push
(
url
,
undefined
);
},
[
link
,
router
]);
},
[
link
,
router
]);
if
(
isLoading
)
{
if
(
isLoading
)
{
...
...
ui/pages/Block.tsx
View file @
24258d46
...
@@ -21,9 +21,13 @@ export interface Props {
...
@@ -21,9 +21,13 @@ export interface Props {
const
BlockPageContent
=
({
tab
}:
Props
)
=>
{
const
BlockPageContent
=
({
tab
}:
Props
)
=>
{
const
router
=
useRouter
();
const
router
=
useRouter
();
if
(
!
router
.
query
.
id
)
{
return
null
;
}
return
(
return
(
<
Page
>
<
Page
>
<
PageTitle
text=
{
`Block #${ router.query.id
|| ''
}`
}
/>
<
PageTitle
text=
{
`Block #${ router.query.id }`
}
/>
<
RoutedTabs
<
RoutedTabs
tabs=
{
TABS
}
tabs=
{
TABS
}
defaultActiveTab=
{
tab
}
defaultActiveTab=
{
tab
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment