fix: recent supporters, embed HTML nesting, and 401 hard reload - #842
Merged
OlaGreat merged 1 commit intoJul 24, 2026
Merged
Conversation
OlaGreat#829, OlaGreat#827, OlaGreat#826) - OlaGreat#829: embed page now fetches /transactions?limit=5 (sorted by createdAt desc) instead of the all-time leaderboard, so "Recent Supporters" shows genuinely recent activity instead of the biggest all-time donors. - OlaGreat#827: added frontend/src/app/embed/layout.tsx and stopped the embed page from rendering its own <html>/<head>/<body>, eliminating the invalid double-nested document that broke embed.css and background transparency in iframes. embed.css now forces a transparent background since the route still inherits the root layout's <body>. - OlaGreat#826: apiFetch no longer calls window.location.reload() on a 401 — it dispatches an "auth:expired" CustomEvent. A new AuthExpiredListener (mounted in Providers) shows a re-auth prompt instead of destroying in-progress form state on pages like edit-profile or the dashboard. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
@Obiajulu-gif Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Lighthouse Report 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/leaderboard). Now fetches/profiles/:username/transactions?limit=5(sorted bycreatedAtdesc) for genuinely recent activity.<html>/<head>/<body>with nolayout.tsxoverride, producing invalid double-nested HTML that brokeembed.cssand the transparent background in iframes. Addedfrontend/src/app/embed/layout.tsxas a bare passthrough and removed the page's own document tags. Since the route still inherits the root layout's<body>(Next App Router has no way to fully opt out),embed.cssnow forcesbackground: transparent !importantonhtml, body.apiFetchcalledwindow.location.reload()on a 401, destroying any in-progress form state (edit-profile fields, dashboard toggles). It now dispatches anauth:expiredCustomEvent; a newAuthExpiredListener(mounted inProviders) shows a re-auth prompt and lets the user navigate away deliberately viarouter.replace("/")instead of a hard reload.Closes #829
Closes #827
Closes #826
Test plan
/embed/:usernamedirectly and inspect the rendered DOM — no nested<html>,embed.cssapplied, background transparentnext build— pre-existing lint errors inprivacy/termspages are unrelated to this change (verified present onmainbefore this branch)