Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Fix Announcement base path

Joshen Lim2bcfe1c59a28
diff --git a/packages/ui/src/layout/banners/Announcement.Countdown.tsx b/packages/ui/src/layout/banners/Announcement.Countdown.tsx
index 2cb4dada4d3..d7db18938e4 100644
--- a/packages/ui/src/layout/banners/Announcement.Countdown.tsx
+++ b/packages/ui/src/layout/banners/Announcement.Countdown.tsx
@@ -27,6 +27,7 @@ function CountdownBanner() {
const { pathname } = useRouter()
const isLaunchWeekPage = pathname === '/launch-week'
const isLaunchWeekSection = pathname.includes('launch-week')
+ const basePath = typeof window !== 'undefined' ? window.location.origin : ''
const renderer = ({ days, hours, minutes, seconds, completed }: any) => {
if (completed) {
@@ -35,7 +36,7 @@ function CountdownBanner() {
<div className="w-full flex gap-3 md:gap-6 items-center justify-center">
<p>Supabase Launch Week 7</p>
<div>
- <Link href="/launch-week">
+ <Link href={`${basePath}/launch-week`}>
<a className="bg-white text-xs px-1.5 md:px-2.5 py-1 rounded-full text-[#9E44EF] shadow-none hover:shadow-mg cursor-pointer">
Explore
</a>
@@ -63,7 +64,7 @@ function CountdownBanner() {
</div>
{!isLaunchWeekPage && (
<div className="hidden md:block">
- <Link href="/launch-week">
+ <Link href={`${basePath}/launch-week`}>
<a className="bg-white text-xs px-1.5 md:px-2.5 py-1 rounded-full text-[#9E44EF] shadow-none hover:shadow-mg cursor-pointer">
Get your ticket
</a>
diff --git a/packages/ui/src/layout/banners/data/Announcement.json b/packages/ui/src/layout/banners/data/Announcement.json
index 6d0c0443e7a..ee460e86b28 100644
--- a/packages/ui/src/layout/banners/data/Announcement.json
+++ b/packages/ui/src/layout/banners/data/Announcement.json
@@ -2,6 +2,6 @@
"show": true,
"text": "Supabase Launch Week 7",
"launchDate": "2023-04-10T07:00:00.000-07:00",
- "link": "http://supabase.com/launch-week",
+ "link": "/launch-week",
"badge": "Get your ticket"
}