Skip to content
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

Replace useEntityModal with local state approach #1234

Closed
4 tasks done
gildub opened this issue Jul 29, 2023 · 0 comments · Fixed by #1246
Closed
4 tasks done

Replace useEntityModal with local state approach #1234

gildub opened this issue Jul 29, 2023 · 0 comments · Fixed by #1246

Comments

@gildub
Copy link
Contributor

gildub commented Jul 29, 2023

Replace legacy useEntityModal with local state approach equivalent of :`

  const [createUpdateModalState, setCreateUpdateModalState] = React.useState<
    "create" | JobFunction | null
  >(null);
  const isCreateUpdateModalOpen = createUpdateModalState !== null;
  const jobFunctionToUpdate =
    createUpdateModalState !== "create" ? createUpdateModalState : null;

We want to generalize the latter approach we're implementing for consistency.

To track down the removal of useEntityModal:

  • ApplicationAssessmentPageHeader
  • ApplicationTableAnalyze
  • ApplicationTableAssessment
  • Finaly remove hook and test file
gildub added a commit that referenced this issue Aug 3, 2023
Replace useEntityModal with in-file state.

See #1234 for details

Also:
- Add missing notification when managing applications credentials.
- Application-form: Replace Alert with Notification
gildub added a commit that referenced this issue Aug 8, 2023
…1246)

- Replace UseEntityModal with local state "standard" approach we now use
- Remove useEntityModal hook which is not used anymore.

Resolves #1234
ibolton336 pushed a commit to ibolton336/tackle2-ui that referenced this issue Aug 8, 2023
…onveyor#1246)

- Replace UseEntityModal with local state "standard" approach we now use
- Remove useEntityModal hook which is not used anymore.

Resolves konveyor#1234
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 a pull request may close this issue.

1 participant