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

feat: Update ocntext and useProducts hook #77

Conversation

mkarajohn
Copy link
Contributor

@mkarajohn mkarajohn commented Oct 11, 2023

Resolves DSTRBTN-540

Resolves DSTRBTN-538

Generated summary (powered by Graphite)

TL;DR

This pull request removes the use of QueryClient and QueryClientProvider from the authentication context tests and the useOrfiumProducts hook. It also modifies the Product type and the way orfiumProducts is fetched and used.

What changed

  • Removed QueryClient and QueryClientProvider from authentication context tests.
  • Removed QueryClient from useOrfiumProducts hook and replaced it with useState and useEffect.
  • Modified the Product type to include client_id, grant_types, icon_url, and rearranged the order of properties.
  • Changed the way orfiumProducts is fetched and used in AuthenticationProvider.

How to test

  • Run the authentication context tests to ensure they still pass without the QueryClient.
  • Check the useOrfiumProducts hook to ensure it still fetches and returns data correctly.
  • Check the AuthenticationProvider to ensure orfiumProducts is used correctly.

Why make this change

  • The way orfiumProducts is fetched and used was changed to to resolve issues with using this component in applications with newer versions of react-query, since the renameing of the package to @tanstack/react-query causes resolution issues.
  • The QueryClient and QueryClientProvider were removed because they were not necessary for the tests or the useOrfiumProducts hook.
  • The Product type was modified to better reflect the data being fetched.

Copy link
Contributor Author

mkarajohn commented Oct 11, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

Copy link
Contributor Author

mkarajohn commented Oct 24, 2023

Merge activity

@mkarajohn mkarajohn changed the base branch from 10-11-chore_add_new_svgs_update_package.json_and_move_some_components_around to 10-10-feat_add_custom_Menu_component October 24, 2023 14:43
@mkarajohn mkarajohn merged commit e0b4ff6 into 10-10-feat_add_custom_Menu_component Oct 24, 2023
1 of 4 checks passed
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