-
Notifications
You must be signed in to change notification settings - Fork 61
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
refactor(coral): Replace hacky notification solution in ProfileDropdown #1824
Merged
Merged
Changes from 21 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
81cc04a
update: install @aivenio/aquarium 1.39.0
dotarjun bf9fef3
feat: dismiss toast programmatically in case of logout error
dotarjun c9bce5b
refactor: add comment describing logout toast being dismissed program…
dotarjun a9c43a6
refactor: update test to check for useToastContext
dotarjun aaef069
refactor: fix mockedUseToastContext
dotarjun a9f10eb
refactor: move dismiss toast inside "error is not 401" condition
dotarjun 877bc62
feat: add test for dismiss toast
dotarjun 87705ae
refactor: rename function for better readability
dotarjun d59b77d
Merge branch 'main' into fixes-issue-1810
410d9de
refactor: update snapshots
dotarjun 46111d6
refactor: move useToastContext within provider
dotarjun 2b44426
Merge branch 'main' into fixes-issue-1810
dotarjun b254a50
bug: change useToastContext return type to array from object
dotarjun ef8558d
Merge branch 'main' into fixes-issue-1810
dotarjun 9ed34b4
Merge branch 'main' into fixes-issue-1810
dotarjun 10b1c02
Merge branch 'main' into fixes-issue-1810
dotarjun f9d7a28
refactor: fix pnpm-lock file
dotarjun 8d0a1b6
refactor: update snapshots
dotarjun 5902969
Merge branch 'main' into fixes-issue-1810
5b163ef
Merge branch 'main' into fixes-issue-1810
dotarjun 04f6367
Merge branch 'main' into fixes-issue-1810
6400ea7
refactor: move toast variables out of onDropdownClick
dotarjun b2197d8
Merge branch 'main' into fixes-issue-1810
dotarjun e72407b
Merge branch 'main' into fixes-issue-1810
fbdc575
Merge branch 'main' into fixes-issue-1810
b2b9fd3
fix(coral): Fix tests which were mocking useToast instead of useToast…
09e101a
Merge branch 'main' into fixes-issue-1810
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Was there a reason to move this in the body of the
onDropdownClick
function?Because in this state, clicking Logout throws an error and does nothing, as hooks can only be called in the body of a component:
Screen.Recording.2023-10-24.at.15.36.43.mov
I think moving it back where it was before (under
const authUser = useAuthContext();
) should fix the issue and still preserve the behaviour we want.