Files
supabase/apps/studio/components/ui/BannerStack/Banners/BannerLaunchWeek16.utils.ts
Danny White 52614926a3 feat(studio): promote Launch Week 16 in the Banner Stack (#54512)
## Problem

Launch Week 16 is promoted on www but needs the same promotion in hosted
Studio.

## Solution

Add a low-priority card to the existing bottom-right Banner Stack across
project, organisation, and account pages. It uses the shared dot artwork
from #54511, links to the Launch Week site, saves dismissal, and expires
after December 11 in San Francisco. Signed-out and self-hosted Studio do
not show it.

| After |
| --- |
| <img width="995" height="584" alt="1211"
src="https://github.com/user-attachments/assets/ff1a60a3-6a4e-4b32-a3df-7fdfe74f4afb"
/> |
| <img width="995" height="584" alt="68318"
src="https://github.com/user-attachments/assets/3a41c56a-fe59-4800-ae14-82ec42c6f260"
/> |

## Review instructions

1. Open a hosted project, organisation, or account page on the Studio
preview. If another notice is in front, expand the Banner Stack to find
**Launch Week 16**.
2. Check the artwork, copy, and **Claim your ticket** button in light
and dark mode. The button opens the Launch Week site in a new tab and
dismisses the card.
3. Close the card and reload. It should stay dismissed.
2026-12-03 10:56:14 +07:00

15 lines
441 B
TypeScript

export const LAUNCH_WEEK_16_DISMISSAL_KEY = 'launch_week_16_banner_dismissed'
export const LAUNCH_WEEK_16_EXPIRES_AT = Date.parse('2026-12-12T08:00:00Z')
export const shouldShowLaunchWeek16Banner = ({
isPlatform,
isDismissalLoaded,
isDismissed,
now,
}: {
isPlatform: boolean
isDismissalLoaded: boolean
isDismissed: boolean
now: number
}) => isPlatform && isDismissalLoaded && !isDismissed && now < LAUNCH_WEEK_16_EXPIRES_AT