-
Notifications
You must be signed in to change notification settings - Fork 1
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
FLME-340: invalidate activities list when consent is accepted #480
Conversation
Pull Request Test Coverage Report for Build 7072141838
💛 - Coveralls |
391085d
to
9a8f36b
Compare
@@ -25,7 +25,7 @@ jest.mock('./useHttpClient', () => ({ | |||
const useActiveProjectMock = useActiveProject as jest.Mock; | |||
const useHttpClientMock = useHttpClient as jest.Mock; | |||
|
|||
const renderHookInContext = (useHook: Function) => { | |||
const renderHookInContext = <T extends any>(useHook: () => T) => { |
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.
What's the reason for extending any
here?
queryClient.resetQueries({ queryKey: ACTIVITIES_QUERY_KEY }); | ||
await options?.onSuccess?.(data, variables); |
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.
Should we leave a comment here about why we refresh the activities on refresh? It might not be obvious for other devs in the future.
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.
Absolutely. I'll follow-up with that.
🎉 This PR is included in version 9.1.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Changes
If a user has been enrolled into a program before their first login, we need to refresh their activity list whenever they accept a consent. Accepting consent can result in new activities showing up.
Screenshots