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

ENG-1 Fixed "My DAOs" menu update issue when DAOs are favorited/unfavorited. #2628

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

johnqh
Copy link
Contributor

@johnqh johnqh commented Dec 12, 2024

useState is local to the component. So when the state is changed in one component, it is not changed in other components even if they appear to be using the same state.

I found a little library called useBetween. It triggers state updates in all components with useState on the same field. This seems to be the fix with the lightest changes.

Copy link

netlify bot commented Dec 12, 2024

Deploy Preview for decent-interface-dev ready!

Name Link
🔨 Latest commit 4bbd4cb
🔍 Latest deploy log https://app.netlify.com/sites/decent-interface-dev/deploys/675b3bdd5f0f4a0008ede8ff
😎 Deploy Preview https://deploy-preview-2628.app.dev.decentdao.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@adamgall adamgall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the formatting issues (try npm run pretty), I like it! Never realized that favoriting/unfavoring a DAO didn't result in immediate changes to the My DAOs list. Good find and clean fix.

Copy link
Contributor

@Da-Colon Da-Colon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto @adamgall

@johnqh johnqh merged commit 53107ac into develop Dec 13, 2024
7 checks passed
@adamgall adamgall deleted the issue/my-daos-list-update branch December 13, 2024 16:56
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.

5 participants