mirror of
https://github.com/supabase/supabase.git
synced 2026-12-06 08:29:01 +00:00
## Problem - supabase.com/launch-week shows the lw15 page, and the lw16 card app runs as a separate vercel app - a forward rule for all of `/launch-week/*` also covers the www pages of past launch weeks, and www does not add its security headers to forwarded paths ## Solution - moves the lw15 page to `/launch-week/15` - adds rewrites that forward `/launch-week` and its other paths to the lw16 card app at `launch-week-16.vercel.app/launch-week/` - changes the root rule to target `/launch-week/` directly because www removes the trailing slash and the app adds it, a loop otherwise - keeps `/launch-week/7`, `/8`, `/15`, `/ticket` and `/tickets/*` on www with the www security headers - adds the launch week paths to the security header tests - adds `/launch-week` to the paths that the redirect checks leave to other apps ## Preview links | Site | Live | Preview | Search for | | ---- | ---- | ------- | ---------- | | WWW | [/launch-week](https://supabase.com/launch-week) | [/launch-week](https://zone-www-dot-com-git-antlio-lw16-launch-week-rewrite-supabase.vercel.app/launch-week) | Claim your card | | WWW | [/launch-week/15](https://supabase.com/launch-week/15) | [/launch-week/15](https://zone-www-dot-com-git-antlio-lw16-launch-week-rewrite-supabase.vercel.app/launch-week/15) | Launch Week 15 | ## Review instructions 1. run `pnpm --filter www exec vitest run lib/security-headers.test.ts` and make sure that all tests pass 2. open the preview [/launch-week](https://zone-www-dot-com-git-antlio-lw16-launch-week-rewrite-supabase.vercel.app/launch-week) and make sure that the lw16 card page loads with no redirect loop 3. open the preview [/launch-week/](https://zone-www-dot-com-git-antlio-lw16-launch-week-rewrite-supabase.vercel.app/launch-week/) and make sure that www redirects it to `/launch-week` once ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
46 lines
1.3 KiB
TypeScript
46 lines
1.3 KiB
TypeScript
import Image from 'next/image'
|
|
import React from 'react'
|
|
|
|
import { SmallCard } from './components'
|
|
|
|
const LWAnnouncement = () => {
|
|
const announcement = (
|
|
<>
|
|
<div className="relative shrink flex items-center p-2 w-2/3 md:w-auto">
|
|
<div className="flex flex-col gap-1 sm:pl-2">
|
|
<div className="flex items-center gap-2">
|
|
<span className="text-foreground">Launch Week 8</span>
|
|
</div>
|
|
<span className="text-foreground-light">Explore all the announcements</span>
|
|
</div>
|
|
</div>
|
|
<div className="relative flex items-center justify-center aspect-video! h-[80px] md:h-[80px] gap-2 z-10 rounded-sm overflow-hidden">
|
|
<Image
|
|
src="/images/launchweek/8/lw8-og.jpg"
|
|
alt="Launch Week 8"
|
|
layout="fill"
|
|
objectFit="cover"
|
|
/>
|
|
</div>
|
|
</>
|
|
)
|
|
|
|
return (
|
|
<div className="w-full max-w-xl opacity-0 animate-[fadeIn_0.5s_cubic-bezier(0.25,0.25,0,1)_0.5s_both]!">
|
|
<SmallCard
|
|
className="border hover:border-stronger transition-colors"
|
|
innerClassName="opacity-70 items-stretch"
|
|
>
|
|
<a
|
|
href="/launch-week"
|
|
className="flex flex-row justify-between items-center w-full h-full gap-2 text-left"
|
|
>
|
|
{announcement}
|
|
</a>
|
|
</SmallCard>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default LWAnnouncement
|