changed the intro page when logged in

fixes #2

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2020-05-15 12:05:23 +02:00 committed by Philip Molares
parent 88d7524ec5
commit fbd29c0338

View file

@ -1,14 +1,17 @@
import React from 'react'
import React, { Fragment } from 'react'
import screenshot from './img/screenshot.png';
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
import {Button} from 'react-bootstrap';
import {Trans, useTranslation} from "react-i18next";
import {Link} from "react-router-dom";
import {useSelector} from "react-redux";
import {ApplicationState} from "../../../../redux";
const Intro: React.FC = () => {
// ToDo replace this with comment
const url = "http://localhost:3000";//useServerUrl();
useTranslation();
const user = useSelector((state: ApplicationState) => state.user);
return (
<div id="home" className="section">
@ -20,6 +23,9 @@ const Intro: React.FC = () => {
<Trans i18nKey="coverSlogan"/>
</p>
{
user.status === "forbidden" ?
<Fragment>
<div className="mb-5">
<Link to="/login">
<Button
@ -47,6 +53,10 @@ const Intro: React.FC = () => {
</div>
<img alt="CodiMD Screenshot" src={screenshot} className="screenshot img-fluid mb-5"/>
</Fragment>
:
null
}
<div className="lead row mb-5" style={{width: '90%', margin: '0 auto'}}>
<div className="col-md-4 inner">