mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-24 18:56:32 -05:00
changed the intro page when logged in
fixes #2 Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
88d7524ec5
commit
fbd29c0338
1 changed files with 34 additions and 24 deletions
|
@ -1,14 +1,17 @@
|
||||||
import React from 'react'
|
import React, { Fragment } from 'react'
|
||||||
import screenshot from './img/screenshot.png';
|
import screenshot from './img/screenshot.png';
|
||||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||||
import {Button} from 'react-bootstrap';
|
import {Button} from 'react-bootstrap';
|
||||||
import {Trans, useTranslation} from "react-i18next";
|
import {Trans, useTranslation} from "react-i18next";
|
||||||
import {Link} from "react-router-dom";
|
import {Link} from "react-router-dom";
|
||||||
|
import {useSelector} from "react-redux";
|
||||||
|
import {ApplicationState} from "../../../../redux";
|
||||||
|
|
||||||
const Intro: React.FC = () => {
|
const Intro: React.FC = () => {
|
||||||
// ToDo replace this with comment
|
// ToDo replace this with comment
|
||||||
const url = "http://localhost:3000";//useServerUrl();
|
const url = "http://localhost:3000";//useServerUrl();
|
||||||
useTranslation();
|
useTranslation();
|
||||||
|
const user = useSelector((state: ApplicationState) => state.user);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div id="home" className="section">
|
<div id="home" className="section">
|
||||||
|
@ -20,6 +23,9 @@ const Intro: React.FC = () => {
|
||||||
<Trans i18nKey="coverSlogan"/>
|
<Trans i18nKey="coverSlogan"/>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
{
|
||||||
|
user.status === "forbidden" ?
|
||||||
|
<Fragment>
|
||||||
<div className="mb-5">
|
<div className="mb-5">
|
||||||
<Link to="/login">
|
<Link to="/login">
|
||||||
<Button
|
<Button
|
||||||
|
@ -47,6 +53,10 @@ const Intro: React.FC = () => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<img alt="CodiMD Screenshot" src={screenshot} className="screenshot img-fluid mb-5"/>
|
<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="lead row mb-5" style={{width: '90%', margin: '0 auto'}}>
|
||||||
<div className="col-md-4 inner">
|
<div className="col-md-4 inner">
|
||||||
|
|
Loading…
Reference in a new issue