1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-04 00:18:01 +01:00

fix: passwordchecker

This commit is contained in:
Fredrik Oseberg 2021-05-31 13:55:20 +02:00
parent 0a020c6b3e
commit 281e027c8a
4 changed files with 29 additions and 20 deletions

View File

@ -1,6 +1,13 @@
import { makeStyles } from '@material-ui/styles'; import { makeStyles } from '@material-ui/core/styles';
export const useStyles = makeStyles(theme => ({ export const useStyles = makeStyles(theme => ({
resetPassword: {
width: '350px',
maxWidth: '350px',
[theme.breakpoints.down('xs')]: {
width: '100%',
},
},
container: { container: {
display: 'flex', display: 'flex',
}, },

View File

@ -17,24 +17,26 @@ const ResetPassword = () => {
return ( return (
<div ref={ref}> <div ref={ref}>
<StandaloneLayout> <StandaloneLayout>
<ConditionallyRender <div className={styles.resetPassword}>
condition={invalidToken} <ConditionallyRender
show={<InvalidToken />} condition={invalidToken}
elseShow={ show={<InvalidToken />}
<ResetPasswordDetails elseShow={
token={token} <ResetPasswordDetails
setLoading={setLoading} token={token}
> setLoading={setLoading}
<Typography
variant="h2"
className={styles.title}
data-loading
> >
Reset password <Typography
</Typography> variant="h2"
</ResetPasswordDetails> className={styles.title}
} data-loading
/> >
Reset password
</Typography>
</ResetPasswordDetails>
}
/>
</div>
</StandaloneLayout> </StandaloneLayout>
</div> </div>
); );

View File

@ -12,7 +12,7 @@ const ResetPasswordDetails: FC<IResetPasswordDetails> = ({
setLoading, setLoading,
}) => { }) => {
return ( return (
<div> <div style={{ width: '100%' }}>
{children} {children}
<ResetPasswordForm token={token} setLoading={setLoading} /> <ResetPasswordForm token={token} setLoading={setLoading} />
</div> </div>

View File

@ -28,7 +28,7 @@ const NUMBER_ERROR = 'The password must contain at least one number.';
const SYMBOL_ERROR = const SYMBOL_ERROR =
'The password must contain at least one special character.'; 'The password must contain at least one special character.';
const UPPERCASE_ERROR = const UPPERCASE_ERROR =
'The password must contain at least one uppercase letter'; 'The password must contain at least one uppercase letter.';
const LOWERCASE_ERROR = const LOWERCASE_ERROR =
'The password must contain at least one lowercase letter.'; 'The password must contain at least one lowercase letter.';