feat: register & login ui

This commit is contained in:
karishmas6
2024-10-10 21:18:28 +05:30
parent f5713a4a00
commit 53786da128
2 changed files with 11 additions and 10 deletions

View File

@@ -104,7 +104,6 @@ const Login = () => {
)} )}
</Button> </Button>
{/* Redirect to Register */}
<Typography variant="body2" align="center"> <Typography variant="body2" align="center">
Dont have an account?{' '} Dont have an account?{' '}
<Link to="/register" style={{ textDecoration: 'none', color: '#1976d2' }}> <Link to="/register" style={{ textDecoration: 'none', color: '#1976d2' }}>

View File

@@ -50,18 +50,18 @@ const Register = () => {
}; };
return ( return (
<Container maxWidth="sm" sx={{ mt: 8 }}>
<Box <Box
sx={{ sx={{
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
alignItems: 'center', alignItems: 'center',
}} mt: 5,
}}
> >
<Typography variant="h4" gutterBottom> <Typography variant="h4" gutterBottom>
Create an account Create an account
</Typography> </Typography>
<Box component="form" onSubmit={submitForm} sx={{ mt: 1 }}> <Box component="form" onSubmit={submitForm} sx={{ maxWidth: 400, width: '100%' }}>
<TextField <TextField
margin="normal" margin="normal"
required required
@@ -94,7 +94,10 @@ const Register = () => {
disabled={loading || !email || !password} disabled={loading || !email || !password}
> >
{loading ? ( {loading ? (
<CircularProgress size={24} sx={{ color: '#fff' }} /> <>
<CircularProgress size={20} sx={{ mr: 2 }} />
Loading
</>
) : ( ) : (
'Register' 'Register'
)} )}
@@ -107,7 +110,6 @@ const Register = () => {
</Typography> </Typography>
</Box> </Box>
</Box> </Box>
</Container>
); );
}; };