]> git.localhorst.tv Git - alttp.git/blob - resources/js/pages/Front.js
tracker descriptions
[alttp.git] / resources / js / pages / Front.js
1 import React from 'react';
2 import { Button, Col, Container, Image, Row } from 'react-bootstrap';
3 import { useNavigate } from 'react-router-dom';
4
5 import CanonicalLinks from '../components/common/CanonicalLinks';
6
7 const Front = () => {
8         const navigate = useNavigate();
9
10         React.useEffect(() => {
11                 const returnPath = localStorage.getItem('returnPath');
12                 if (returnPath) {
13                         localStorage.removeItem('returnPath');
14                         navigate(returnPath);
15                 }
16         }, []);
17
18         return <Container className="mt-5">
19                 <CanonicalLinks base="/" />
20                 <Row>
21                         <Col md={{ offset: 3, span: 6 }}>
22                                 <Button
23                                         className="front-panel"
24                                         onClick={() => navigate('/tournaments/6')}
25                                         variant="outline-secondary"
26                                 >
27                                         <Image alt="" className="image" src="/media/alttp/front.png" />
28                                         <div className="title">
29                                                 ALttPR Weekly
30                                         </div>
31                                 </Button>
32                         </Col>
33                 </Row>
34         </Container>;
35 };
36
37 export default Front;