Skip to content

fix(assets): get cached assets info #585

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

Merged
merged 4 commits into from
Jan 24, 2025
Merged

fix(assets): get cached assets info #585

merged 4 commits into from
Jan 24, 2025

Conversation

luisburigo
Copy link
Member

@luisburigo luisburigo commented Jan 20, 2025

Description

This PR fixes the issue when listing asset information.

Problem

  • On the first access, the assets were not set in the local storage.
  • The assetList was storing a static value, and only on the next reload would it have the correct value.

Solution

  • Do not use the static value from the assetList.
  • Remove asset storage through the service.
  • Create a store using Zustand with middleware to persist state in local storage.
  • Create a hook to consume the store and build the assetMap.

Copy link

vercel bot commented Jan 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bsafe-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 22, 2025 2:33pm

@guimroque guimroque merged commit 5c93c22 into staging Jan 24, 2025
2 checks passed
Copy link
Contributor

github-actions bot commented Mar 5, 2025

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants