refactor: Use useSettings hook in DefaultRedirectionSnackbar#2117
Open
refactor: Use useSettings hook in DefaultRedirectionSnackbar#2117
useSettings hook in DefaultRedirectionSnackbar#2117Conversation
zatteo
reviewed
Apr 11, 2024
| ...homeSettings, | ||
| default_redirection_view_count: default_redirection_view_count | ||
| ? default_redirection_view_count + 1 | ||
| : 1 |
Member
There was a problem hiding this comment.
I do not see anymore this logic of setting 1 if there was no value before. Will it work ?
Contributor
Author
There was a problem hiding this comment.
Finally we did not include the default parameter option in the useSettings API, so I added the necessary code in this cozy-home PR
f17fe1a to
7070fa5
Compare
7814cd4 to
7542e40
Compare
`cozy-client` has been upgraded to `46.9.0` to retrieve the new useSettings hook Related PR: linagora/cozy-client#1460
In linagora/cozy-client#1460 we implemented a new `useSettings` hook This hook can be used in `DefaultRedirectionSnackbar` in order to simplify code and homogenize the way we access cozy-apps settings
useSettings hook in DefaultRedirectionSnackbar
7542e40 to
349b630
Compare
BundleMonFiles updated (7)
Unchanged files (6)
Total files change -80.05KB -2.55% Final result: ✅ View report in BundleMon website ➡️ |
zatteo
approved these changes
Apr 22, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In linagora/cozy-client#1460 we implemented a new
useSettingshookThis hook can be used in
DefaultRedirectionSnackbarin order to simplify code and homogenize the way we access cozy-apps settings