fix: remove acceptTermsConditions from SignUpPage
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
import { yupResolver } from '@hookform/resolvers/yup';
|
||||
import _ from '@lodash';
|
||||
import Button from '@mui/material/Button';
|
||||
import Checkbox from '@mui/material/Checkbox';
|
||||
import FormControl from '@mui/material/FormControl';
|
||||
import FormControlLabel from '@mui/material/FormControlLabel';
|
||||
import FormHelperText from '@mui/material/FormHelperText';
|
||||
import Paper from '@mui/material/Paper';
|
||||
import TextField from '@mui/material/TextField';
|
||||
import Typography from '@mui/material/Typography';
|
||||
@@ -20,7 +16,6 @@ const defaultValues = {
|
||||
email: '',
|
||||
password: '',
|
||||
passwordConfirm: '',
|
||||
acceptTermsConditions: false,
|
||||
};
|
||||
|
||||
function SignUpPage({ t }) {
|
||||
@@ -29,7 +24,6 @@ function SignUpPage({ t }) {
|
||||
email: yup.string().email(t('email_error')).required(t('email_error')),
|
||||
password: yup.string().required(t('password_error')).min(8, t('password_error')),
|
||||
passwordConfirm: yup.string().oneOf([yup.ref('password'), null], t('password_confirm_error')),
|
||||
acceptTermsConditions: yup.boolean().oneOf([true], t('accept_terms_error')),
|
||||
});
|
||||
|
||||
const { control, formState, handleSubmit, setError } = useForm({
|
||||
@@ -173,25 +167,6 @@ function SignUpPage({ t }) {
|
||||
)}
|
||||
/>
|
||||
|
||||
<Controller
|
||||
name="acceptTermsConditions"
|
||||
control={control}
|
||||
render={({ field }) => (
|
||||
<FormControl className="items-start" error={!!errors.acceptTermsConditions}>
|
||||
<FormControlLabel
|
||||
label={t('accept_terms')}
|
||||
control={
|
||||
<Checkbox
|
||||
{...field}
|
||||
sx={{ color: (theme) => theme.palette.common.disabled }}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
<FormHelperText>{errors?.acceptTermsConditions?.message}</FormHelperText>
|
||||
</FormControl>
|
||||
)}
|
||||
/>
|
||||
|
||||
<div className="flex flex-col items-center justify-center gap-10 w-full">
|
||||
<Button
|
||||
variant="contained"
|
||||
|
||||
Reference in New Issue
Block a user