Skip to content

Renewal form error handling #2705

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

Merged
merged 6 commits into from
Feb 19, 2025
Merged

Renewal form error handling #2705

merged 6 commits into from
Feb 19, 2025

Conversation

RoyEJohnson
Copy link
Contributor

@RoyEJohnson RoyEJohnson commented Feb 13, 2025

CORE-759
It will be useful to look at the individual commits for the main files ported from js->tsx. All of them are ported in "Port relevant modues to TS, fix lint issues". Most of them are updated there, but I had to give multiselect its own separate commit for its updates.
renewal-form.tsx is updated in several commits (the functional change for this PR is in "Disable submit until user and adoption info have loaded", and I removed some unused branches in "Test coverage").

@RoyEJohnson RoyEJohnson force-pushed the renewal-form-error-handling branch 2 times, most recently from 423a742 to bd81565 Compare February 13, 2025 22:31
@RoyEJohnson RoyEJohnson requested a review from jivey February 13, 2025 23:03
@RoyEJohnson RoyEJohnson force-pushed the renewal-form-error-handling branch from bd81565 to 5d1451d Compare February 17, 2025 22:53
@@ -1,8 +1,8 @@
import {useReducer, useCallback} from 'react';
import buildContext from '~/components/jsx-helpers/build-context';

function useContextValue({maxSelections}) {
const [data, dispatch] = useReducer((state, [action, item]) => {
function useContextValue<T extends {value: string; text: string}>({maxSelections}: {maxSelections: number}) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would adding label let you remove the as Item[] here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it, but it's used in sf-book-context and the books structure there doesn't include a label.

@RoyEJohnson RoyEJohnson merged commit e22a073 into main Feb 19, 2025
1 check passed
@RoyEJohnson RoyEJohnson deleted the renewal-form-error-handling branch February 19, 2025 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants