Skip to content
Snippets Groups Projects
Commit 3dd6c3e5 authored by Remco Tukker's avatar Remco Tukker
Browse files

small fix for compendium section navigation and new bundle

parent de3cf397
No related branches found
No related tags found
1 merge request!64useBlock in the survey frontend to ask users for confirmation
import React from 'react'; 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 { Container, Row, ButtonToolbar, Button } from 'react-bootstrap';
import { Sections } from '../helpers/constants'; import { Sections } from '../helpers/constants';
...@@ -8,48 +8,44 @@ interface inputProps { ...@@ -8,48 +8,44 @@ interface inputProps {
} }
const SectionNavigation = ({ activeCategory }: inputProps) => { const SectionNavigation = ({ activeCategory }: inputProps) => {
const navigate = useNavigate();
return ( return (
<Container> <Container>
<Row> <Row>
<ButtonToolbar className="navbox-bar gap-2 m-3"> <ButtonToolbar className="navbox-bar gap-2 m-3">
<Link to={activeCategory === Sections.Organisation ? '.' : '/funding'}>
<Button <Button
onClick={() => navigate(activeCategory === Sections.Organisation ? '.' : '/funding')}
variant={'nav-box'} variant={'nav-box'}
active={activeCategory === Sections.Organisation}> active={activeCategory === Sections.Organisation}>
<span>{Sections.Organisation}</span> <span>{Sections.Organisation}</span>
</Button> </Button>
</Link>
<Link to={activeCategory === Sections.Policy ? '.' : '/policy'}>
<Button <Button
onClick={() => navigate(activeCategory === Sections.Policy ? '.' : '/policy')}
variant={'nav-box'} variant={'nav-box'}
active={activeCategory === Sections.Policy}> active={activeCategory === Sections.Policy}>
<span>{Sections.Policy}</span> <span>{Sections.Policy}</span>
</Button> </Button>
</Link>
<Link to={activeCategory === Sections.ConnectedUsers ? '.' : '.'}>
<Button <Button
onClick={() => navigate(activeCategory === Sections.ConnectedUsers ? '.' : '.')}
variant={'nav-box'} variant={'nav-box'}
active={activeCategory === Sections.ConnectedUsers} active={activeCategory === Sections.ConnectedUsers}
disabled={true}> disabled={true}>
<span>{Sections.ConnectedUsers}</span> <span>{Sections.ConnectedUsers}</span>
</Button> </Button>
</Link>
<Link to={activeCategory === Sections.Network ? '.' : '.'}>
<Button <Button
onClick={() => navigate(activeCategory === Sections.Network ? '.' : '.')}
variant={'nav-box'} variant={'nav-box'}
active={activeCategory === Sections.Network} active={activeCategory === Sections.Network}
disabled={true}> disabled={true}>
<span>{Sections.Network}</span> <span>{Sections.Network}</span>
</Button> </Button>
</Link>
<Link to={activeCategory === Sections.Services ? '.' : '.'}>
<Button <Button
onClick={() => navigate(activeCategory === Sections.Services ? '.' : '.')}
variant={'nav-box'} variant={'nav-box'}
active={activeCategory === Sections.Services} active={activeCategory === Sections.Services}
disabled={true}> disabled={true}>
<span>{Sections.Services}</span> <span>{Sections.Services}</span>
</Button> </Button>
</Link>
</ButtonToolbar> </ButtonToolbar>
</Row> </Row>
</Container> </Container>
... ...
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
...@@ -66,3 +66,36 @@ ...@@ -66,3 +66,36 @@
* This source code is licensed under the MIT license found in the * This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
/**
* @remix-run/router v1.1.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
/**
* React Router DOM v6.5.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
/**
* React Router v6.5.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment