Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
Clickable Area for New Certificate Button (#96)
Browse files Browse the repository at this point in the history
* Added navigate
* Bumped up version
  • Loading branch information
dc-andysign authored Mar 19, 2024
1 parent 6d645a1 commit e2f64de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@digicatapult/sqnc-hyproof-client",
"version": "0.3.18",
"version": "0.3.19",
"description": "User interface for HyProof",
"homepage": "https://github.com/digicatapult/sqnc-hyproof-client",
"main": "src/index.js",
Expand Down
7 changes: 3 additions & 4 deletions src/pages/CertificatesViewAll.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import {
Button,
} from '@digicatapult/ui-component-library'

import { Link } from 'react-router-dom'

import Nav from './components/Nav'
import Header from './components/Header'
import BgMoleculesImageSVG from '../assets/images/molecules-bg-repeat.svg'
Expand Down Expand Up @@ -97,6 +95,7 @@ export default function CertificatesViewAll() {

const persona = personas.find(({ id }) => id === current)
const url = `${persona.origin}/v1/certificate`
const redirectToCreate = () => navigate('/certificate?create=y')

React.useEffect(() => {
if (!data) fetch({ url })
Expand Down Expand Up @@ -135,8 +134,8 @@ export default function CertificatesViewAll() {
</Main>
<Sidebar area="sidebar">
{persona.id === 'heidi' && (
<LargeButton variant="roundedPronounced">
<Link to="/certificate?create=y">New Certificate</Link>
<LargeButton onClick={redirectToCreate} variant="roundedPronounced">
New Certificate
</LargeButton>
)}
</Sidebar>
Expand Down

0 comments on commit e2f64de

Please sign in to comment.