-
Notifications
You must be signed in to change notification settings - Fork 379
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
β¨(lld): add empty message and dummy drawer for ordis #7881
Conversation
The latest updates on your projects. Learn more about Vercel for Git βοΈ 5 Skipped Deployments
|
apps/ledger-live-desktop/src/newArch/features/Collectibles/Ordinals/components/Error.tsx
Outdated
Show resolved
Hide resolved
if (items.length > 3) setDisplayShowMore(true); | ||
setDisplayedObjects(items.slice(0, 3)); | ||
}, [items]); | ||
if (displayedObjects.length === 0) { |
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.
I don't understand this
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.
It's to avoid to trigger it at each re render. Sometimes (and when a drawer just opened) displayedObjects comes back to his initial state with only 3 object in it. So I trigger it only at the first render
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.
I've changed to not do it with a use Effect to make easier to read
apps/ledger-live-desktop/src/newArch/features/Collectibles/hooks/useFetchOrdinals.ts
Outdated
Show resolved
Hide resolved
4495cc0
to
b829c8c
Compare
b829c8c
to
559190c
Compare
β Checklist
npx changeset
was attached.π Description
Add empty state in table for inscriptions and rare sats
Add error message to error row
Add dummy drawer that will be replaced by the good one in next pr
Screen.Recording.2024-09-24.at.09.58.41.mov
β Context
π§ Checklist for the PR Reviewers