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

Add link to login, as well as some more detail

parent 97926cb5
No related branches found
No related tags found
No related merge requests found
...@@ -7,9 +7,8 @@ function Landing(): ReactElement { ...@@ -7,9 +7,8 @@ function Landing(): ReactElement {
const { user } = useContext(userContext); const { user } = useContext(userContext);
const navigate = useNavigate(); const navigate = useNavigate();
const loggedIn = user.id !== undefined; const loggedIn = !!user.id;
const hasNren = loggedIn ? !!user.nrens.length : false; const hasNren = loggedIn ? !!user.nrens.length : false;
const activeNren = hasNren ? user.nrens[0] : ''; const activeNren = hasNren ? user.nrens[0] : '';
const moveToSurvey = () => { const moveToSurvey = () => {
...@@ -21,6 +20,7 @@ function Landing(): ReactElement { ...@@ -21,6 +20,7 @@ function Landing(): ReactElement {
return ( return (
<Container className="py-5 grey-container"> <Container className="py-5 grey-container">
<Row> <Row>
{hasNren && moveToSurvey()}
<div className="center-text"> <div className="center-text">
<h1 className="geant-header">THE GÉANT COMPENDIUM OF NRENS SURVEY</h1> <h1 className="geant-header">THE GÉANT COMPENDIUM OF NRENS SURVEY</h1>
...@@ -28,7 +28,7 @@ function Landing(): ReactElement { ...@@ -28,7 +28,7 @@ function Landing(): ReactElement {
<div className="wordwrap pt-4"> <div className="wordwrap pt-4">
<p style={{ textAlign: "center" }}> <p style={{ textAlign: "center" }}>
Hello, Welcome to the GÉANT Compendium Survey. Hello, Welcome to the GÉANT Compendium Survey.
NREN Compendium administrators can click here (link) to complete their registration to fill in the 2023 Compendium survey. NREN Compendium administrators can login <a href="/login">here</a> to complete their registration to fill in the 2023 Compendium survey.
Once your registration has been confirmed you will receive an email from the Compendium administration team. Once your registration has been confirmed you will receive an email from the Compendium administration team.
If you are not sure whether you are a Compendium Administrator for your NREN, please contact your GÉANT Partner Relations relationship manager. If you are not sure whether you are a Compendium Administrator for your NREN, please contact your GÉANT Partner Relations relationship manager.
Thank you. Thank you.
...@@ -37,10 +37,12 @@ function Landing(): ReactElement { ...@@ -37,10 +37,12 @@ function Landing(): ReactElement {
<span>Current registration status:</span> <span>Current registration status:</span>
<br /> <br />
<br /> <br />
<p> <ul>
{loggedIn ? "You are logged in" : "You are not logged in"} {loggedIn ? <li><span>You are logged in</span></li> : <li><span>You are not logged in</span></li>}
{!hasNren ? ", but your access to the survey has not been approved" : moveToSurvey()} {loggedIn && !hasNren && <li><span>Your access to the survey has not been approved</span></li>}
</p> {loggedIn && !hasNren && <li><span>Once you have been approved, you will immediately be directed to the relevant survey upon visiting this page</span></li>}
</ul>
</div> </div>
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment