Files
coder/site/components/SignIn/Welcome.tsx
T
Bryan 4183a4e01c feat: Initial Login flow (#42)
This just implements a basic sign-in flow, using the new endpoints in #29 :
![2022-01-20 12 35 30](https://user-images.githubusercontent.com/88213859/150418044-85900d1f-8890-4c60-baae-234342de71fa.gif)

This brings over several dependencies that are necessary:
- `formik`
- `yep`

Ports over some v1 code to bootstrap it:
- `FormTextField`
- `PasswordField`
- `CoderIcon`

And implements basic sign-in:
Fixes #37 
Fixes #43

This does not implement it navbar integration (importantly - there is no way to sign out yet, unless you manually delete your `session_token`). I'll do that in the next PR - figured this was big enough to get reviewed.
2022-01-21 11:34:26 -08:00

43 lines
888 B
TypeScript

import { makeStyles } from "@material-ui/core/styles"
import { CoderIcon } from "../Icons"
import React from "react"
import Typography from "@material-ui/core/Typography"
export const Welcome: React.FC = () => {
const styles = useStyles()
return (
<div>
<div className={styles.logoBox}>
<CoderIcon className={styles.logo} />
</div>
<Typography className={styles.title} variant="h1">
<>
Welcome to
<br />
Coder
</>
</Typography>
</div>
)
}
const useStyles = makeStyles((theme) => ({
logoBox: {
display: "flex",
justifyContent: "center",
},
logo: {
width: 80,
height: 56,
color: theme.palette.text.primary,
},
title: {
fontSize: 24,
letterSpacing: -0.3,
marginBottom: theme.spacing(3),
marginTop: theme.spacing(6),
textAlign: "center",
},
}))