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

Don't redirect admin users

parent 3ab2d1e7
Branches
Tags
No related merge requests found
This diff is collapsed.
......@@ -21,7 +21,6 @@ function Landing(): ReactElement {
return (
<Container className="py-5 grey-container">
<Row>
{hasNren && moveToSurvey()}
<div className="center-text">
<h1 className="geant-header">THE GÉANT COMPENDIUM OF NRENS SURVEY</h1>
......@@ -38,16 +37,17 @@ function Landing(): ReactElement {
<span>Current registration status:</span>
<br />
<br />
{isAdmin && <ul>
{isAdmin ? <ul>
<li><span>You are logged in as a Compendium Administrator</span></li>
<li><span>Click <a href="/survey/admin/surveys">here</a> to access the survey management page.</span></li>
<li><span>Click <a href="/survey/admin/users">here</a> to access the user management page.</span></li>
</ul> : <ul>
{!isAdmin && hasNren && moveToSurvey()}
{loggedIn ? <li><span>You are logged in</span></li> : <li><span>You are not logged in</span></li>}
{loggedIn && !hasNren && <li><span>Your access to the survey has not been approved</span></li>}
{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>}
<ul>
{!isAdmin && (loggedIn ? <li><span>You are logged in</span></li> : <li><span>You are not logged in</span></li>)}
{!isAdmin && loggedIn && !hasNren && <li><span>Your access to the survey has not been approved</span></li>}
{!isAdmin && 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>
......
......@@ -55,9 +55,8 @@ function SurveyContainerComponent({ loadFrom, saveTo = '', readonly = false }) {
getModel().catch(error => setError('Error when loading survey: ' + error.message))
});
console.log(surveyModel)
if (surveyModel === undefined) {
}, []);
if (!surveyModel) {
return error
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment