Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
compendium-v2
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
geant-swd
compendium-v2
Merge requests
!64
useBlock in the survey frontend to ask users for confirmation
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
useBlock in the survey frontend to ask users for confirmation
feature/react-router-stuff
into
develop
Overview
0
Commits
6
Pipelines
0
Changes
20
Merged
Remco Tukker
requested to merge
feature/react-router-stuff
into
develop
1 year ago
Overview
0
Commits
6
Pipelines
0
Changes
20
Expand
use a context provider for the filter selection in the compendium frontend
so that we can upgrade to data routers in both frontends
so that I can useBlock in the survey frontend to ask users for confirmation when they press the back button while editing...
and also improve the survey component to allow for rerenders because everything rerenders if navigating away is blocked.....
Edited
1 year ago
by
Remco Tukker
0
0
Merge request reports
Compare
develop
version 4
77fdaca8
1 year ago
version 3
2a4df433
1 year ago
version 2
bd5aa6a7
1 year ago
version 1
3dd6c3e5
1 year ago
develop (base)
and
latest version
latest version
b0c5c093
6 commits,
1 year ago
version 4
77fdaca8
5 commits,
1 year ago
version 3
2a4df433
4 commits,
1 year ago
version 2
bd5aa6a7
3 commits,
1 year ago
version 1
3dd6c3e5
2 commits,
1 year ago
20 files
+
387
−
277
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
20
Search (e.g. *.vue) (Ctrl+P)
compendium-frontend/src/components/SectionNavigation.tsx
+
35
−
39
Options
import
React
from
'
react
'
;
import
{
Link
}
from
'
react-router-dom
'
;
import
{
useNavigate
}
from
'
react-router-dom
'
;
import
{
Container
,
Row
,
ButtonToolbar
,
Button
}
from
'
react-bootstrap
'
;
import
{
Sections
}
from
'
../helpers/constants
'
;
@@ -8,48 +8,44 @@ interface inputProps {
}
const
SectionNavigation
=
({
activeCategory
}:
inputProps
)
=>
{
const
navigate
=
useNavigate
();
return
(
<
Container
>
<
Row
>
<
ButtonToolbar
className
=
"navbox-bar gap-2 m-3"
>
<
Link
to
=
{
activeCategory
===
Sections
.
Organisation
?
'
.
'
:
'
/funding
'
}
>
<
Button
variant
=
{
'
nav-box
'
}
active
=
{
activeCategory
===
Sections
.
Organisation
}
>
<
span
>
{
Sections
.
Organisation
}
</
span
>
</
Button
>
</
Link
>
<
Link
to
=
{
activeCategory
===
Sections
.
Policy
?
'
.
'
:
'
/policy
'
}
>
<
Button
variant
=
{
'
nav-box
'
}
active
=
{
activeCategory
===
Sections
.
Policy
}
>
<
span
>
{
Sections
.
Policy
}
</
span
>
</
Button
>
</
Link
>
<
Link
to
=
{
activeCategory
===
Sections
.
ConnectedUsers
?
'
.
'
:
'
.
'
}
>
<
Button
variant
=
{
'
nav-box
'
}
active
=
{
activeCategory
===
Sections
.
ConnectedUsers
}
disabled
=
{
true
}
>
<
span
>
{
Sections
.
ConnectedUsers
}
</
span
>
</
Button
>
</
Link
>
<
Link
to
=
{
activeCategory
===
Sections
.
Network
?
'
.
'
:
'
.
'
}
>
<
Button
variant
=
{
'
nav-box
'
}
active
=
{
activeCategory
===
Sections
.
Network
}
disabled
=
{
true
}
>
<
span
>
{
Sections
.
Network
}
</
span
>
</
Button
>
</
Link
>
<
Link
to
=
{
activeCategory
===
Sections
.
Services
?
'
.
'
:
'
.
'
}
>
<
Button
variant
=
{
'
nav-box
'
}
active
=
{
activeCategory
===
Sections
.
Services
}
disabled
=
{
true
}
>
<
span
>
{
Sections
.
Services
}
</
span
>
</
Button
>
</
Link
>
<
Button
onClick
=
{
()
=>
navigate
(
activeCategory
===
Sections
.
Organisation
?
'
.
'
:
'
/funding
'
)
}
variant
=
{
'
nav-box
'
}
active
=
{
activeCategory
===
Sections
.
Organisation
}
>
<
span
>
{
Sections
.
Organisation
}
</
span
>
</
Button
>
<
Button
onClick
=
{
()
=>
navigate
(
activeCategory
===
Sections
.
Policy
?
'
.
'
:
'
/policy
'
)
}
variant
=
{
'
nav-box
'
}
active
=
{
activeCategory
===
Sections
.
Policy
}
>
<
span
>
{
Sections
.
Policy
}
</
span
>
</
Button
>
<
Button
onClick
=
{
()
=>
navigate
(
activeCategory
===
Sections
.
ConnectedUsers
?
'
.
'
:
'
.
'
)
}
variant
=
{
'
nav-box
'
}
active
=
{
activeCategory
===
Sections
.
ConnectedUsers
}
disabled
=
{
true
}
>
<
span
>
{
Sections
.
ConnectedUsers
}
</
span
>
</
Button
>
<
Button
onClick
=
{
()
=>
navigate
(
activeCategory
===
Sections
.
Network
?
'
.
'
:
'
.
'
)
}
variant
=
{
'
nav-box
'
}
active
=
{
activeCategory
===
Sections
.
Network
}
disabled
=
{
true
}
>
<
span
>
{
Sections
.
Network
}
</
span
>
</
Button
>
<
Button
onClick
=
{
()
=>
navigate
(
activeCategory
===
Sections
.
Services
?
'
.
'
:
'
.
'
)
}
variant
=
{
'
nav-box
'
}
active
=
{
activeCategory
===
Sections
.
Services
}
disabled
=
{
true
}
>
<
span
>
{
Sections
.
Services
}
</
span
>
</
Button
>
</
ButtonToolbar
>
</
Row
>
</
Container
>
Loading