mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-22 03:49:18 +02:00
fix(sponsor): anchor 14-day toast cooldown on show, not just on CTA click (#2477)
The sponsor toast re-fired on every fresh browser session. The backend owns the 14-day cooldown but only persists the anchor (last_shown_at) and the seen-milestone record inside POST /sponsor-prompt/dismiss, and the hook only called dismiss from the "View supporters" CTA onClick. A user who saw the toast but never clicked the CTA persisted no state; the per-tab sessionStorage guard hid the re-fire within one session, but every new session re-checked against empty state and re-showed the same milestone. Record the toast as shown the moment it renders (POST /dismiss right after showPersistentToast) so display is what arms the cooldown. CTA click stays optional and just navigates. Frontend-only; backend cooldown logic unchanged.
This commit is contained in:
File diff suppressed because one or more lines are too long
+1
-1
@@ -26,7 +26,7 @@
|
||||
|
||||
<!-- Splash screens for iOS -->
|
||||
<link rel="apple-touch-startup-image" href="/img/android-chrome-512x512.png" />
|
||||
<script type="module" crossorigin src="/assets/index-DqJZ0C8s.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-Bp9OAjMR.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BxVhuRti.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user