Fix Announcement base path

This commit is contained in:
Joshen Lim committed 2023-04-24 10:52:53 +08:00
1 parent fd20f18808
commit 2bcfe1c59a
2 files changed
+4 -3

No files matched your search

@@ -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>
@@ -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"
}