Skip to content
Snippets Groups Projects
Commit 6216a505 authored by Bjarke Madsen's avatar Bjarke Madsen
Browse files

Use the first proper page for each section when navigating using the section buttons

parent a05b85e2
Branches
Tags
No related merge requests found
import React from 'react'; import React from 'react';
import { useNavigate } from 'react-router-dom'; import { useNavigate } from 'react-router-dom';
import { Container, Row, ButtonToolbar, Button } from 'react-bootstrap'; import { Container, Row, ButtonToolbar, Button } from 'react-bootstrap';
import { Sections } from '../helpers/constants'; import { Sections } from "compendium/helpers/constants";
interface inputProps { interface inputProps {
activeCategory: Sections activeCategory: Sections
...@@ -20,7 +20,7 @@ const SectionNavigation = ({ activeCategory }: inputProps) => { ...@@ -20,7 +20,7 @@ const SectionNavigation = ({ activeCategory }: inputProps) => {
<span>{Sections.Organisation}</span> <span>{Sections.Organisation}</span>
</Button> </Button>
<Button <Button
onClick={() => navigate(activeCategory === Sections.Policy ? '.' : '/policy')} onClick={() => navigate(activeCategory === Sections.Policy ? '.' : '/corporate-strategy')}
variant={'nav-box'} variant={'nav-box'}
active={activeCategory === Sections.Policy}> active={activeCategory === Sections.Policy}>
<span>{Sections.Policy}</span> <span>{Sections.Policy}</span>
...@@ -32,7 +32,7 @@ const SectionNavigation = ({ activeCategory }: inputProps) => { ...@@ -32,7 +32,7 @@ const SectionNavigation = ({ activeCategory }: inputProps) => {
<span>{Sections.ConnectedUsers}</span> <span>{Sections.ConnectedUsers}</span>
</Button> </Button>
<Button <Button
onClick={() => navigate(activeCategory === Sections.Network ? '.' : '/traffic-volume')} onClick={() => navigate(activeCategory === Sections.Network ? '.' : '/dark-fibre-lease')}
variant={'nav-box'} variant={'nav-box'}
active={activeCategory === Sections.Network}> active={activeCategory === Sections.Network}>
<span>{Sections.Network}</span> <span>{Sections.Network}</span>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment