mirror of
https://github.com/rjNemo/ticket_manager
synced 2026-06-12 03:36:39 +00:00
redirect to home page after successful sign in
This commit is contained in:
parent
d00d2af9f9
commit
9f6b3344b1
2 changed files with 1 additions and 51 deletions
|
|
@ -1,9 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
import { render } from '@testing-library/react';
|
|
||||||
import App from './App';
|
|
||||||
|
|
||||||
test('renders learn react link', () => {
|
|
||||||
const { getByText } = render(<App />);
|
|
||||||
const linkElement = getByText(/learn react/i);
|
|
||||||
expect(linkElement).toBeInTheDocument();
|
|
||||||
});
|
|
||||||
|
|
@ -2,10 +2,6 @@ import React from "react";
|
||||||
import Avatar from "@material-ui/core/Avatar";
|
import Avatar from "@material-ui/core/Avatar";
|
||||||
import Button from "@material-ui/core/Button";
|
import Button from "@material-ui/core/Button";
|
||||||
import CssBaseline from "@material-ui/core/CssBaseline";
|
import CssBaseline from "@material-ui/core/CssBaseline";
|
||||||
import TextField from "@material-ui/core/TextField";
|
|
||||||
import FormControlLabel from "@material-ui/core/FormControlLabel";
|
|
||||||
import Checkbox from "@material-ui/core/Checkbox";
|
|
||||||
import Link from "@material-ui/core/Link";
|
|
||||||
import Paper from "@material-ui/core/Paper";
|
import Paper from "@material-ui/core/Paper";
|
||||||
import Grid from "@material-ui/core/Grid";
|
import Grid from "@material-ui/core/Grid";
|
||||||
import LockOutlinedIcon from "@material-ui/icons/LockOutlined";
|
import LockOutlinedIcon from "@material-ui/icons/LockOutlined";
|
||||||
|
|
@ -51,6 +47,7 @@ const useStyles = makeStyles((theme: Theme) =>
|
||||||
export default function SignInSide() {
|
export default function SignInSide() {
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
const { isAuthenticated, loginWithRedirect, logout } = useAuth0();
|
const { isAuthenticated, loginWithRedirect, logout } = useAuth0();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid container component="main" className={classes.root}>
|
<Grid container component="main" className={classes.root}>
|
||||||
<CssBaseline />
|
<CssBaseline />
|
||||||
|
|
@ -64,32 +61,6 @@ export default function SignInSide() {
|
||||||
Sign in
|
Sign in
|
||||||
</Typography>
|
</Typography>
|
||||||
<form className={classes.form} noValidate>
|
<form className={classes.form} noValidate>
|
||||||
{/* <TextField
|
|
||||||
variant="outlined"
|
|
||||||
margin="normal"
|
|
||||||
required
|
|
||||||
fullWidth
|
|
||||||
id="email"
|
|
||||||
label="Email Address"
|
|
||||||
name="email"
|
|
||||||
autoComplete="email"
|
|
||||||
autoFocus
|
|
||||||
/>
|
|
||||||
<TextField
|
|
||||||
variant="outlined"
|
|
||||||
margin="normal"
|
|
||||||
required
|
|
||||||
fullWidth
|
|
||||||
name="password"
|
|
||||||
label="Password"
|
|
||||||
type="password"
|
|
||||||
id="password"
|
|
||||||
autoComplete="current-password"
|
|
||||||
/>
|
|
||||||
<FormControlLabel
|
|
||||||
control={<Checkbox value="remember" color="primary" />}
|
|
||||||
label="Remember me"
|
|
||||||
/> */}
|
|
||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
fullWidth
|
fullWidth
|
||||||
|
|
@ -100,18 +71,6 @@ export default function SignInSide() {
|
||||||
>
|
>
|
||||||
Sign In
|
Sign In
|
||||||
</Button>
|
</Button>
|
||||||
{/* <Grid container>
|
|
||||||
<Grid item xs>
|
|
||||||
<Link href="#" variant="body2">
|
|
||||||
Forgot password?
|
|
||||||
</Link>
|
|
||||||
</Grid>
|
|
||||||
<Grid item>
|
|
||||||
<Link href="#" variant="body2">
|
|
||||||
{"Don't have an account? Sign Up"}
|
|
||||||
</Link>
|
|
||||||
</Grid>
|
|
||||||
</Grid> */}
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue