feat(contractor): add useContractorPaymentMethodForm hook#2302
Conversation
|
@cursoragent fix the format issues that are failing CI |
|
Perfect! I've fixed the formatting issue that was causing the CI failure. What I did:
The formatting CI check should now pass on the next run. |
| export type ContractorPaymentMethodFieldsMetadata = UseContractorPaymentMethodFormReady['form']['fieldsMetadata']; | ||
|
|
||
| // @public | ||
| export type ContractorPaymentMethodFormData = { type: "Check" | "Direct Deposit"; }; |
There was a problem hiding this comment.
I love it when the derived types are easy to read
| export { | ||
| useContractorPaymentMethodForm, | ||
| ContractorPaymentMethodErrorCodes, | ||
| PAYMENT_METHOD_TYPES as ContractorPaymentMethodTypes, |
There was a problem hiding this comment.
Why rename the export from a screaming case const to a pascal case? (actually a question)
There was a problem hiding this comment.
who am i to ask why claude does the things claude does?
There was a problem hiding this comment.
more seriously good catch! will fix
mariechatfield
left a comment
There was a problem hiding this comment.
Awesome this looks beautiful
|
@cursoragent fix the above export unneeded casing change and bring up to date/resolve conflicts |
|
Perfect! I've successfully completed both tasks: What I Fixed1. Export Casing Issue
2. Merged with Main
Commits Pushed
The branch is now up to date with main and the export follows proper naming conventions! |
Headless React Hook Form hook for a contractor's payment method type (Direct Deposit vs Check). On submit it PUTs the payment method; the Direct Deposit path defers bank-account creation to the bank account form, so this hook owns only the type selection and the Check write. Co-authored-by: Cursor <cursoragent@cursor.com>
The constant is an internal implementation detail. Partners have: - The hook which provides Fields.Type with options baked in - ContractorPaymentMethodFormType for TypeScript typing No need to expose the raw constant array.
847bcf5 to
4a24ba4
Compare


Summary
useContractorPaymentMethodForm, a headless React Hook Form hook for a contractor's payment method type (Direct Deposit vs Check).PUTs the payment method. The Direct Deposit path defers actual bank-account creation touseContractorBankAccountForm, so this hook owns only the type selection and the Check write.TypeFieldsubcomponent and types via the public surface.Notes
useContractorBankAccountForm; PR3 integrates both into thePaymentMethodcomponent (and will supersede feat(contractor): migrate PaymentMethod to useContractorPaymentMethodForm hook #2293).Test plan
useContractorPaymentMethodFormunit + schema tests pass (6/6)npm run deriveregenerates API report + docsMade with Cursor