Skip to content

fix: hide likes when data is being fetched#984

Open
sacrosanctic wants to merge 2 commits intonpmx-dev:mainfrom
sacrosanctic:like-flashing
Open

fix: hide likes when data is being fetched#984
sacrosanctic wants to merge 2 commits intonpmx-dev:mainfrom
sacrosanctic:like-flashing

Conversation

@sacrosanctic
Copy link
Contributor

the likes flashes a 0 briefly before showing the actual value.

I opted to just hide it for now as a quick fix.

@vercel
Copy link

vercel bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 5, 2026 6:22am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 5, 2026 6:22am
npmx-lunaria Ignored Ignored Feb 5, 2026 6:22am

Request Review

@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/pages/package/[...package].vue 0.00% 8 Missing ⚠️

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 5, 2026

📝 Walkthrough

Walkthrough

Replaced optional chaining in the package page likes UI with direct property access (likesData.userHasLiked, likesData.totalLikes) and exposed the fetch status as likesStatus. Added a guard (v-if="likesStatus !== 'pending'") to avoid rendering like-related bindings while the fetch is pending, so the template assumes likesData is defined only after fetch completion.

Suggested reviewers

  • danielroe
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The description directly addresses the changeset by identifying the specific issue (likes flashing 0) and explaining the implemented solution (hiding likes during fetch).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

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.

1 participant