From d6b6e5531881c8e9624d5eaa405659159e9eed3c Mon Sep 17 00:00:00 2001 From: Bjarke Madsen <bjarke@nordu.net> Date: Tue, 23 May 2023 16:12:00 +0200 Subject: [PATCH] Update header to link to /data and GEANT icon links to https://geant.org --- webapp/src/components/DataPage.tsx | 10 ++++++++-- webapp/src/components/global/ExternalPageNavBar.tsx | 2 +- webapp/src/components/global/PageHeader.tsx | 6 +++--- webapp/src/pages/CompendiumData.tsx | 6 +++++- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/webapp/src/components/DataPage.tsx b/webapp/src/components/DataPage.tsx index 243cd2ea..b3f0f898 100644 --- a/webapp/src/components/DataPage.tsx +++ b/webapp/src/components/DataPage.tsx @@ -1,5 +1,7 @@ import React, { ReactElement } from "react"; -import { Container, Row, Col } from "react-bootstrap"; +import { Container, Row } from "react-bootstrap"; +import { Link } from "react-router-dom"; + import OrganizationSidebar from "./OrganizationSidebar"; import PageHeader from "../components/global/PageHeader" import SectionLink from "../components/global/SectionLink"; @@ -19,7 +21,11 @@ function DataPage({ title, filter, children, category }: inputProps): ReactEleme <> {category === Sections.Organisation && <OrganizationSidebar />} {category === Sections.Policy && <PolicySidebar />} - <PageHeader type={'data'} header={'Compendium Data'}> + <PageHeader type={'data'} header={<h1 className={'bold-caps-30pt'}> + <Link to="/data" style={{ textDecoration: 'none', color: 'white' }}> + <span>Compendium Data</span> + </Link> + </h1>}> <SectionLink section={"Reports"} /> </PageHeader> <SectionNavigation activeCategory={category} /> diff --git a/webapp/src/components/global/ExternalPageNavBar.tsx b/webapp/src/components/global/ExternalPageNavBar.tsx index 943babba..701d7f10 100644 --- a/webapp/src/components/global/ExternalPageNavBar.tsx +++ b/webapp/src/components/global/ExternalPageNavBar.tsx @@ -15,7 +15,7 @@ function ExternalPageNavBar(): ReactElement { <Container> <Row> <nav> - <a href="/"><img src={GeantLogo} /></a> + <a href="https://geant.org/"><img src={GeantLogo} /></a> <ul> <li><a href="https://network.geant.org/">NETWORK</a></li> diff --git a/webapp/src/components/global/PageHeader.tsx b/webapp/src/components/global/PageHeader.tsx index a4756171..368b3d92 100644 --- a/webapp/src/components/global/PageHeader.tsx +++ b/webapp/src/components/global/PageHeader.tsx @@ -3,7 +3,7 @@ import { Container, Row, Col } from "react-bootstrap"; interface inputProps { type: string, - header: string, + header: ReactElement, children: ReactElement } @@ -20,10 +20,10 @@ function CompendiumHeader({ type, header, children }: inputProps): ReactElement <Container> <Row> <Col sm={8}> - <h1 className={'bold-caps-30pt '}>{header}</h1> + {header} </Col> <Col sm={4}> - {children} + {children} </Col> </Row> </Container> diff --git a/webapp/src/pages/CompendiumData.tsx b/webapp/src/pages/CompendiumData.tsx index c067a1f3..0ec005d6 100644 --- a/webapp/src/pages/CompendiumData.tsx +++ b/webapp/src/pages/CompendiumData.tsx @@ -10,7 +10,11 @@ import { Sections } from "../helpers/constants"; function CompendiumData(): ReactElement { return ( <main className="content" style={{ backgroundColor: "white" }}> - <PageHeader type={'data'} header={'Compendium Data'}> + <PageHeader type={'data'} header={<h1 className={'bold-caps-30pt'}> + <Link to="/data" style={{ textDecoration: 'none', color: 'white' }}> + <span>Compendium Data</span> + </Link> + </h1>}> <SectionLink section={"Reports"} /> </PageHeader> <Banner type={'data'}> -- GitLab