Skip to content

Don't show "Loading..." in the payment page when there is nothing to …#1123

Merged
Klakurka merged 1 commit intoPayButton:masterfrom
Fabcien:fix_loading_payments
Mar 4, 2026
Merged

Don't show "Loading..." in the payment page when there is nothing to …#1123
Klakurka merged 1 commit intoPayButton:masterfrom
Fabcien:fix_loading_payments

Conversation

@Fabcien
Copy link
Collaborator

@Fabcien Fabcien commented Mar 4, 2026

…show

This fixes a bug that prevents the "No Payments to show yet" message from being displayed when there is no payment. Instead it would always show "Loading..."

Summary by CodeRabbit

  • Bug Fixes
    • Fixed an issue where table loading indicators didn't properly clear after data fetching completed, ensuring the UI state remains accurate during the data loading process.

…show

This fixes a bug that prevents the "No Payments to show yet" message from being displayed when there is no payment. Instead it would always show "Loading..."
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 258a545b-6b86-4cec-8743-641855db9a2d

📥 Commits

Reviewing files that changed from the base of the PR and between f44fa99 and 1340e25.

📒 Files selected for processing (1)
  • pages/payments/index.tsx

📝 Walkthrough

Walkthrough

The loadData function's finally block now calls setTableLoading(false) to clear the table loading state when the data fetch completes, ensuring both loading indicators are properly reset.

Changes

Cohort / File(s) Summary
Loading State Management
pages/payments/index.tsx
Added setTableLoading(false) call in the finally block of loadData function to clear table loading state alongside general loading state when data fetch completes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A loading state found its twin,
Both now clear when tasks begin,
One line added, smooth and clean,
Table dance, no longer seen! ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete; it lacks required template sections like 'Related to #', 'Test plan', and a more detailed 'Description' section. Only a brief explanation of the bug fix is provided. Add the missing template sections: link the related issue, describe the fix in detail, and include a test plan explaining how the fix was validated.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main fix: preventing the 'Loading...' indicator from showing when there are no payments, allowing the appropriate empty-state message to display.

✏️ 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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@Klakurka Klakurka added bug Something isn't working enhancement (UI/UX/feature) New feature or request labels Mar 4, 2026
@Klakurka Klakurka self-requested a review March 4, 2026 19:45
@Klakurka Klakurka modified the milestones: Phase 4, Phase 3 Mar 4, 2026
@Klakurka Klakurka merged commit a30d6af into PayButton:master Mar 4, 2026
3 of 4 checks passed
@Fabcien Fabcien deleted the fix_loading_payments branch March 5, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement (UI/UX/feature) New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants