-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAuthPrompt.tsx
More file actions
62 lines (61 loc) · 2.09 KB
/
AuthPrompt.tsx
File metadata and controls
62 lines (61 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import { useState } from "react";
import { Grid, Button } from "semantic-ui-react";
import { useRouter, NextRouter } from "next/router";
import AboutModal from "../common/AboutModal";
import styles from "../../styles/landingpage.module.css";
import { LOGO_PATH, LOGO_LOGIN_PATH } from "../../utils/branding";
const AuthPrompt = (): JSX.Element => {
const [showAboutModal, setShowAboutModal] = useState(false);
const router: NextRouter = useRouter();
return (
<div
style={{
height: "100%",
width: "100%",
display: "flex",
alignItems: "center",
justifyContent: "center",
}}
>
<Grid columns={1} textAlign="center">
<Grid.Row only="computer tablet">
<img
src={LOGO_LOGIN_PATH}
width="600px"
height="107px"
alt="logo"
/>
</Grid.Row>
<Grid.Row only="mobile">
<img
src={LOGO_PATH}
width="217px"
height="107px"
alt="logo-mini"
/>
</Grid.Row>
<Grid.Row>
<Button
style={{ width: "340px" }}
href={`/api/accounts/login/?next=${router.pathname}`}
>
Log In
</Button>
</Grid.Row>
<div
className={`${styles.about} ${styles["about-landing"]}`}
role="button"
id="about-button"
onClick={() => setShowAboutModal(true)}
>
<p>About</p>
</div>
<AboutModal
open={showAboutModal}
closeFunc={() => setShowAboutModal(false)}
/>
</Grid>
</div>
);
};
export default AuthPrompt;