-
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
Use a Context for fetching Registrations #10323
base: main
Are you sure you want to change the base?
Conversation
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.
Would like someone more confident in Context design weigh in if stuff like
const isRegistered = Boolean(registration) && registration.competing.registration_status !== 'cancelled'; const isAccepted = isRegistered && registration.competing.registration_status === 'accepted'; const isRejected = isRegistered && registration.competing.registration_status === 'rejected';
makes sense to expose in the Context or not
Makes sense to me 👍
app/webpacker/components/RegistrationsV2/lib/RegistrationProvider.js
Outdated
Show resolved
Hide resolved
app/webpacker/components/RegistrationsV2/lib/RegistrationProvider.js
Outdated
Show resolved
Hide resolved
app/webpacker/components/RegistrationsV2/Register/Processing.jsx
Outdated
Show resolved
Hide resolved
This works, but now |
Hm I thought I feel like maybe the provider should be responsible for doing the registration actions too, e.g. |
From my basic testing everything seems to work as expected. Would like someone more confident in Context design weigh in if stuff like
makes sense to expose in the Context or not