Skip to content

Commit 9364346

Browse files
committed
Revert "Fix #37"
This reverts commit 66ad9b2.
1 parent 7a3a23a commit 9364346

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/app/components/pages/Registration.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,14 @@ interface RegistrationPageProps {
4646

4747
const RegistrationPageComponent = ({user, updateCurrentUser, errorMessage, userEmail, userPassword}: RegistrationPageProps) => {
4848

49-
const [myUser, setMyUser] = useState(Object.assign({}, user, {password: "", dateOfBirth: null}));
49+
const [myUser, setMyUser] = useState(Object.assign({}, user, {password: ""}));
5050
const [unverifiedPassword, setUnverifiedPassword] = useState(userPassword ? userPassword : "");
5151
const [isValidEmail, setValidEmail] = useState(true);
52-
const [isDobValid, setIsDobValid] = useState(false);
52+
const [isDobValid, setIsDobValid] = useState(true);
5353
const [isValidPassword, setValidPassword] = useState(false);
5454
const [currentPassword, setCurrentPassword] = useState("");
5555
const [signUpAttempted, setSignUpAttempted] = useState(false);
5656
const [tempDob, setTempDob] = useState("");
57-
const [dobCheckboxChecked, setDobCheckboxChecked] = useState(false);
5857

5958
const attemptSignUp = () => {
6059
setSignUpAttempted(true);
@@ -169,7 +168,6 @@ const RegistrationPageComponent = ({user, updateCurrentUser, errorMessage, userE
169168
type="date"
170169
name="date-of-birth"
171170
onChange={(event: React.ChangeEvent<HTMLInputElement>) => {
172-
setDobCheckboxChecked(false);
173171
setTempDob(event.target.value);
174172
const dateOfBirth = event.target.value;
175173
setIsDobValid(validateDob(dateOfBirth));
@@ -181,8 +179,6 @@ const RegistrationPageComponent = ({user, updateCurrentUser, errorMessage, userE
181179
<Col lg={1}>
182180
<CustomInput
183181
disabled={tempDob != ""}
184-
checked={isDobValid || dobCheckboxChecked}
185-
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setDobCheckboxChecked(!dobCheckboxChecked)}
186182
id="age-confirmation-input"
187183
type="checkbox"
188184
name="age-confirmation"

0 commit comments

Comments
 (0)