Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions src/components/SignUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,9 @@ export default function SignUp() {
const isEmailValid = validateEmail();
const isPasswordValid = validatePassword();
const isZipValid = validateZip();
const isOver14Valid = isOverAge14 === true;

if (!isEmailValid || !isPasswordValid || !isZipValid) {
if (!isEmailValid || !isPasswordValid || !isZipValid || !isOver14Valid) {
return false;
}

Expand Down Expand Up @@ -467,7 +468,13 @@ export default function SignUp() {
Are you 14 or over?
<div className="text-[red]">*</div>
</div>
<div className="text-[#667085] text-[14px]">
<div
className={`text-[14px] ${
isOverAge14 === false
? "text-red-500"
: "text-[#667085]"
}`}
>
Note: we require volunteers to be at least 14 to work
with us.
</div>
Expand Down Expand Up @@ -688,15 +695,15 @@ export default function SignUp() {
) : (
<button
className={`${
!isFormComplete || submitLoading
!isFormComplete || submitLoading || !isOverAge14
? "bg-[#96E3DA]"
: "bg-[#138D8A]"
} text-white py-[10px] px-[18px] rounded-[8px] w-full text-center font-semibold`}
type="submit"
onClick={async () => {
await throttledSubmit();
}}
disabled={!isFormComplete || submitLoading}
disabled={!isFormComplete || submitLoading || !isOverAge14}
>
Sign Up
</button>
Expand Down