]> git.localhorst.tv Git - alttp.git/blob - resources/js/components/pages/AosFront.js
update front page title on navigate
[alttp.git] / resources / js / components / pages / AosFront.js
1 import React from 'react';
2 import { Button, Col, Container, Row } from 'react-bootstrap';
3 import { withTranslation } from 'react-i18next';
4
5 import Icon from '../common/Icon';
6 import i18n from '../../i18n';
7
8 const authEndpoint = 'https://discord.com/oauth2/authorize';
9 const clientId = '951113702839549982';
10 const botUrl = `${authEndpoint}?client_id=${clientId}&scope=bot%20applications.commands`;
11 const commandUrl = `${authEndpoint}?client_id=${clientId}&scope=applications.commands`;
12
13 const AosFront = () => {
14         React.useEffect(() => {
15                 window.document.title = 'Aos';
16         }, []);
17         return <Container>
18                 <div className="my-5 text-center">
19                         <h1>Castlevania: Aria of Sorrow</h1>
20                 </div>
21                 <Row>
22                         <Col className="text-center mb-3" sm={6} md={4}>
23                                 <Button
24                                         href="https://discord.gg/VEtVYNr"
25                                         size="lg"
26                                         target="_blank"
27                                         variant="discord"
28                                 >
29                                         <Icon.DISCORD />
30                                         {' '}
31                                         {i18n.t('aos.randoDiscord')}
32                                 </Button>
33                         </Col>
34                         <Col className="text-center mb-3" sm={6} md={4}>
35                                 <Button
36                                         href="https://aosrando.surge.sh/"
37                                         size="lg"
38                                         target="_blank"
39                                         variant="primary"
40                                 >
41                                         {i18n.t('aos.randoWeb')}
42                                 </Button>
43                         </Col>
44                         <Col className="text-center mb-3" sm={6} md={4}>
45                                 <Button
46                                         href="https://discord.gg/ApVyJnd"
47                                         size="lg"
48                                         target="_blank"
49                                         variant="discord"
50                                 >
51                                         <Icon.DISCORD />
52                                         {' '}
53                                         {i18n.t('aos.tourneyDiscord')}
54                                 </Button>
55                         </Col>
56                         <Col className="text-center mb-3" sm={6} md={4}>
57                                 <Button
58                                         href={botUrl}
59                                         size="lg"
60                                         target="_blank"
61                                         variant="discord"
62                                 >
63                                         <Icon.DISCORD />
64                                         {' '}
65                                         {i18n.t('aos.inviteBot')}
66                                 </Button>
67                         </Col>
68                         <Col className="text-center mb-3" sm={6} md={4}>
69                                 <Button
70                                         href={commandUrl}
71                                         size="lg"
72                                         target="_blank"
73                                         variant="discord"
74                                 >
75                                         <Icon.DISCORD />
76                                         {' '}
77                                         {i18n.t('aos.inviteCommand')}
78                                 </Button>
79                         </Col>
80                 </Row>
81         </Container>;
82 };
83
84 export default withTranslation()(AosFront);