Skip to content

Commit f3264e5

Browse files
authored
Merge pull request supabase#13922 from supabase/fix/relative-link-in-announcement-banner
Fix relative link in announcement banner
2 parents 8a70dd3 + 2bcfe1c commit f3264e5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/ui/src/layout/banners/Announcement.Countdown.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ function CountdownBanner() {
2727
const { pathname } = useRouter()
2828
const isLaunchWeekPage = pathname === '/launch-week'
2929
const isLaunchWeekSection = pathname.includes('launch-week')
30+
const basePath = typeof window !== 'undefined' ? window.location.origin : ''
3031

3132
const renderer = ({ days, hours, minutes, seconds, completed }: any) => {
3233
if (completed) {
@@ -35,7 +36,7 @@ function CountdownBanner() {
3536
<div className="w-full flex gap-3 md:gap-6 items-center justify-center">
3637
<p>Supabase Launch Week 7</p>
3738
<div>
38-
<Link href="/launch-week">
39+
<Link href={`${basePath}/launch-week`}>
3940
<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">
4041
Explore
4142
</a>
@@ -63,7 +64,7 @@ function CountdownBanner() {
6364
</div>
6465
{!isLaunchWeekPage && (
6566
<div className="hidden md:block">
66-
<Link href="/launch-week">
67+
<Link href={`${basePath}/launch-week`}>
6768
<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">
6869
Get your ticket
6970
</a>

0 commit comments

Comments
 (0)