feat(views): add view for unknown election

pull/4/head
Clement G 5 years ago committed by guhur
parent 41582f2a4b
commit 971dcba948

@ -6,6 +6,7 @@ import CreateElection from "./components/views/CreateElection.js";
import Vote from "./components/views/Vote";
import Result from "./components/views/Result";
import UnknownView from "./components/views/UnknownView";
import UnknownElection from "./components/views/UnknownElection";
function Routes() {
return (<main className="d-flex flex-column justify-content-center" >
@ -14,6 +15,7 @@ function Routes() {
<Route path="/create-election" component={CreateElection} />
<Route path="/vote" component={Vote} />
<Route path="/result" component={Result} />
<Route path="/unknown-election" component={UnknownElection} />
<Route component={UnknownView} />
</Switch>
</main>

@ -0,0 +1,34 @@
import React, {Component} from "react";
import {Col, Container, Row} from "reactstrap";
import logoLine from "../../logos/logo-line-white.svg";
import {Link} from 'react-router-dom';
class UnknownElection extends Component {
constructor(props) {
super(props);
this.state = {
}
}
render(){
return(
<Container>
<Row>
<Link to="/" className="d-block ml-auto mr-auto mb-4"><img src={logoLine} alt="logo" height="128" /></Link>
</Row>
<Row className="mt-4">
<Col className="text-center"><h2>Oups ! Ce vote n'existe pas ou n'est plus disponible.</h2>
<p>N'hésitez pas à démarrer un nouveau vote</p></Col>
</Row>
<Row className="mt-4" >
<Col className="text-center">
<Link to="/" className="btn btn-secondary">Revenir à l'accueil</Link>
</Col>
</Row>
</Container>
)
}
}
export default UnknownElection;
Loading…
Cancel
Save