-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gear order form in WCA website #9815
base: main
Are you sure you want to change the base?
Conversation
This form is not 100% complete, currently I'm facing a blocker that if I mark any of the I remember seeing this while working on Sign Up page migration, but iirc I couldn't find a solution during that time. I request somebody to unblock this issue. Alternative is to use custom validation to check if all the fields are there. |
Currently there is no workaround for this issue - that's how the form behaves in v2 Register as well. I think for now, proceed as if this were not a blocker. |
import i18n from '../../lib/i18n'; | ||
|
||
export default function ContactGearOrder() { | ||
const equipments = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Equipment" doesn't have a plural form.
And this array could be moved out of the component.
const equipments = [ | |
const equipment = [ |
quantity: 0, | ||
price: 0, | ||
}))); | ||
const [totalPrice, setTotalPrice] = useState(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work? Direct calculation is better than a state and an effect.
const [totalPrice, setTotalPrice] = useState(0); | |
const totalPrice = _.sumBy(orderDetails, 'price'); |
a3e44de
to
d64d270
Compare
d64d270
to
27c28df
Compare
In this PR, the gear order form is brought within WCA website so that there will be more options of customizations - for example, the notification emails can be well formatted in a way that it will reduce the workload of WFC, the user can know the total order value while filling the form, etc.