Skip to content

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

Fix an warning about href on React fragment.

Ivan Vasilov1463946b69df
diff --git a/apps/www/components/Footer/index.tsx b/apps/www/components/Footer/index.tsx
index 16a2091ae57..bf99bdc0718 100644
--- a/apps/www/components/Footer/index.tsx
+++ b/apps/www/components/Footer/index.tsx
@@ -109,30 +109,30 @@ const Footer = (props: Props) => {
<h6 className="text-scale-1200 overwrite text-base">{segment.title}</h6>
<ul className="mt-4 space-y-2">
{segment.links.map((link, idx) => {
- const LinkTag = link.url.startsWith('https') ? Fragment : Link
+ const children = (
+ <a
+ // only add href key if link is external
+ {...(link.url.startsWith('https') && { href: link.url })}
+ className={`text-sm transition-colors ${
+ link.url
+ ? 'text-scale-1100 hover:text-scale-1200 '
+ : 'text-scale-900 hover:text-scale-900'
+ } `}
+ >
+ {link.text}
+ {!link.url && (
+ <div className="ml-2 inline text-xs xl:ml-0 xl:block 2xl:ml-2 2xl:inline">
+ <Badge color="scale" size="small">
+ Coming soon
+ </Badge>
+ </div>
+ )}
+ </a>
+ )
return (
<li key={`${segment.title}_link_${idx}`}>
- <LinkTag href={link.url}>
- <a
- // only add href key if link is external
- {...(link.url.startsWith('https') && { href: link.url })}
- className={`text-sm transition-colors ${
- link.url
- ? 'text-scale-1100 hover:text-scale-1200 '
- : 'text-scale-900 hover:text-scale-900'
- } `}
- >
- {link.text}
- {!link.url && (
- <div className="ml-2 inline text-xs xl:ml-0 xl:block 2xl:ml-2 2xl:inline">
- <Badge color="scale" size="small">
- Coming soon
- </Badge>
- </div>
- )}
- </a>
- </LinkTag>
+ {link.url.startsWith('https') ? <Fragment>{children}</Fragment> : <Link href={link.url}>{children}</Link>}
</li>
)
})}