Skip to content

Commit

Permalink
update user creation page
Browse files Browse the repository at this point in the history
  • Loading branch information
krish2903 committed Apr 9, 2024
1 parent f8bf5e5 commit cf86a30
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function UserAccountCreation() {
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
const [confirmPassword, setConfirmPassword] = useState("");
const [isConfirmPasswordValid, setIsConfirmPasswordValid] = useState(false);
const [isConfirmPasswordValid, setIsConfirmPasswordValid] = useState(true);
const navigate = useNavigate();

const handlePasswordToggle = () => {
Expand Down Expand Up @@ -156,7 +156,7 @@ function UserAccountCreation() {
)}
</div>
{!isConfirmPasswordValid && confirmPassword && <p className={styles.validationMessage}>Passwords do not match.</p>}
<input id="submit_button" type="submit" name="submit_btn" value="Create" />
<input id="submit_button" disabled={!isConfirmPasswordValid} type="submit" name="submit_btn" value="Create" />
</form>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,10 @@
transform: translateY(10px);
transition: 100ms;
}

.userAccountForm input[type=submit]:disabled {
background-color: #383838;
color: rgb(176, 176, 176);
box-shadow: none;
transform: none;
}

0 comments on commit cf86a30

Please sign in to comment.