Skip to content

Commit

Permalink
update question and date picker
Browse files Browse the repository at this point in the history
  • Loading branch information
angela-lee1 committed Oct 23, 2024
1 parent d1a2b0d commit 1933169
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
26 changes: 16 additions & 10 deletions client/src/components/presentational/newUserForm.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import React from 'react';

const NewUserForm = (props) => {
return (
Expand Down Expand Up @@ -50,14 +50,18 @@ const NewUserForm = (props) => {
aria-label="Email Address"
required
/>
<label htmlFor="email">{"(This allows easy use of the app. We'll never sell your data!)"}</label>
<label htmlFor="email">
{
"(This allows easy use of the app. We'll never sell your data!)"
}
</label>
</div>
</div>

{props.questions.length !== 0 &&
props.questions.map((question) => {
return (
question.type === "text" && (
question.type === 'text' && (
<div key={question._id} className="form-row">
<div className="form-input-text">
<input
Expand All @@ -71,12 +75,14 @@ const NewUserForm = (props) => {
? props.formInput[
question.htmlName.toString()
].toString()
: ""
: ''
}
onChange={props.handleInputChange}
required
/>
<label htmlFor={question.htmlName}>{question.questionText}</label>
<label htmlFor={question.htmlName}>
{question.questionText}
</label>
</div>
</div>
)
Expand All @@ -86,11 +92,11 @@ const NewUserForm = (props) => {
{props.questions.length !== 0 &&
props.questions.map((question) => {
return (
question.type === "select" && (
question.type === 'select' && (
<div key={question._id} className="form-row last-row">
<div className="form-input-radio">
<label htmlFor={question.htmlName}>
Is this your first time attending a Hack Night?
IS THIS YOUR FIRST TIME ATTENDING A HACK FOR LA MEETING?
</label>
<div className="radio-buttons first-time-select">
<input
Expand Down Expand Up @@ -123,7 +129,7 @@ const NewUserForm = (props) => {
: props.questions.length !== 0 &&
props.questions.map((question) => {
return (
question.htmlName === "attendanceLength" && (
question.htmlName === 'attendanceLength' && (
<div key={question._id} className="form-row">
<div className="form-input-text">
<label htmlFor={question.htmlName}>
Expand Down Expand Up @@ -165,9 +171,9 @@ const NewUserForm = (props) => {
);
})}

{props.isError && props.errorMessage.length > 1 &&
{props.isError && props.errorMessage.length > 1 && (
<div className="error">{props.errorMessage}</div>
}
)}

{!props.isLoading ? (
<div className="form-row">
Expand Down
3 changes: 3 additions & 0 deletions client/src/pages/CheckInForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ const CheckInForm = (props) => {
'DEC',
];
const years = [
'2024',
'2023',
'2022',
'2021',
'2020',
'2019',
Expand Down

0 comments on commit 1933169

Please sign in to comment.