Skip to content

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

fix potential button issues

Jonathan Summers-Muir838ab7cd5daf
diff --git a/apps/www/components/BuiltWithSupabase/index.tsx b/apps/www/components/BuiltWithSupabase/index.tsx
index 48d746c84c1..b467d87e570 100644
--- a/apps/www/components/BuiltWithSupabase/index.tsx
+++ b/apps/www/components/BuiltWithSupabase/index.tsx
@@ -16,18 +16,22 @@ const BuiltExamples = () => {
<p className="p">There are many example apps and starter projects to get going</p>
<div className="flex justify-center gap-2 py-4">
<Link href="/docs/guides/examples" as="/docs/guides/examples" passHref>
- <Button as="a" type="default" size="small">
- View all examples
- </Button>
+ <a>
+ <Button type="default" size="small">
+ View all examples
+ </Button>
+ </a>
</Link>
<Link
href="https://github.com/supabase/supabase/tree/master/examples"
as="https://github.com/supabase/supabase/tree/master/examples"
passHref
>
- <Button as="a" type="default" icon={<IconGitHub />} size="small">
- Official github library
- </Button>
+ <a>
+ <Button type="default" icon={<IconGitHub />} size="small">
+ Official github library
+ </Button>
+ </a>
</Link>
</div>
</div>
diff --git a/apps/www/components/Carousels/SplitCodeBlockCarousel.tsx b/apps/www/components/Carousels/SplitCodeBlockCarousel.tsx
index c8f6c619d70..51d62b25d1e 100644
--- a/apps/www/components/Carousels/SplitCodeBlockCarousel.tsx
+++ b/apps/www/components/Carousels/SplitCodeBlockCarousel.tsx
@@ -126,9 +126,7 @@ function SplitCodeBlockCarousel(props: SplitCodeBlockCarousel) {
{extension.url && (
<Link href={extension.url} as={extension.url}>
<a className="ml-px">
- <Button as="a" type="default">
- View documentation
- </Button>
+ <Button type="default">View documentation</Button>
</a>
</Link>
)}
diff --git a/apps/www/components/Hero.tsx b/apps/www/components/Hero.tsx
index af950a66c16..e97cd31fa74 100644
--- a/apps/www/components/Hero.tsx
+++ b/apps/www/components/Hero.tsx
@@ -40,14 +40,18 @@ const Hero = () => {
</div>
<div className="flex items-center gap-2">
<Link href="https://app.supabase.com" as="https://app.supabase.com" passHref>
- <Button as="a" size="small" className="text-white">
- Start your project
- </Button>
+ <a>
+ <Button size="small" className="text-white">
+ Start your project
+ </Button>
+ </a>
</Link>
<Link href="/docs" as="/docs" passHref>
- <Button as="a" size="small" type="default" icon={<IconBookOpen />}>
- Documentation
- </Button>
+ <a>
+ <Button size="small" type="default" icon={<IconBookOpen />}>
+ Documentation
+ </Button>
+ </a>
</Link>
</div>
<div className="flex flex-col gap-4">
diff --git a/apps/www/components/Sections/GithubExamples.tsx b/apps/www/components/Sections/GithubExamples.tsx
index 16b1c23d20c..85e3cb4e279 100644
--- a/apps/www/components/Sections/GithubExamples.tsx
+++ b/apps/www/components/Sections/GithubExamples.tsx
@@ -32,18 +32,22 @@ function GithubExamples() {
</p>
<div className="flex items-center justify-center gap-2 py-4">
<Link href="/docs/guides/auth/overview" passHref>
- <Button size="small" as="a" type="default" icon={<IconBookOpen size={12} />}>
- View guides
- </Button>
+ <a>
+ <Button size="small" type="default" icon={<IconBookOpen size={12} />}>
+ View guides
+ </Button>
+ </a>
</Link>
<Link
href="https://github.com/supabase/supabase/tree/master/examples"
as="https://github.com/supabase/supabase/tree/master/examples"
passHref
>
- <Button size="small" as="a" type="default" icon={<IconGitHub size={12} />}>
- Official GitHub library
- </Button>
+ <a>
+ <Button size="small" type="default" icon={<IconGitHub size={12} />}>
+ Official GitHub library
+ </Button>
+ </a>
</Link>
</div>
</div>
diff --git a/apps/www/components/Sections/TwitterSocialProof.tsx b/apps/www/components/Sections/TwitterSocialProof.tsx
index 66f2e9e5591..a657c2a20d2 100644
--- a/apps/www/components/Sections/TwitterSocialProof.tsx
+++ b/apps/www/components/Sections/TwitterSocialProof.tsx
@@ -37,28 +37,18 @@ function TwitterSocialProof() {
</p>
<div className="my-8 flex justify-center gap-2">
<Link href={'https://github.com/supabase/supabase/discussions'} passHref>
- <Button
- as="a"
- // @ts-ignore
- target="_blank"
- size="small"
- iconRight={<IconMessageCircle size={14} />}
- type="default"
- >
- GitHub discussions
- </Button>
+ <a target="_blank">
+ <Button size="small" iconRight={<IconMessageCircle size={14} />} type="default">
+ GitHub discussions
+ </Button>
+ </a>
</Link>
<Link href={'https://discord.supabase.com/'} passHref>
- <Button
- as="a"
- type="default"
- // @ts-ignore
- target="_blank"
- size="small"
- iconRight={<IconMessageCircle size={14} />}
- >
- Discord
- </Button>
+ <a target="_blank">
+ <Button type="default" size="small" iconRight={<IconMessageCircle size={14} />}>
+ Discord
+ </Button>
+ </a>
</Link>
</div>
</div>
diff --git a/apps/www/pages/404.tsx b/apps/www/pages/404.tsx
index f31fe7d4dd3..321108babe9 100644
--- a/apps/www/pages/404.tsx
+++ b/apps/www/pages/404.tsx
@@ -61,9 +61,11 @@ const Error404 = () => {
</div>
<div className="flex items-center space-x-4">
<Link href="/">
- <Button as="a" size="small" className="text-white">
- Head back
- </Button>
+ <a>
+ <Button size="small" className="text-white">
+ Head back
+ </Button>
+ </a>
</Link>
</div>
</div>
diff --git a/apps/www/pages/database/Database.tsx b/apps/www/pages/database/Database.tsx
index ce752e0b7bf..4f3639cd5b5 100644
--- a/apps/www/pages/database/Database.tsx
+++ b/apps/www/pages/database/Database.tsx
@@ -298,9 +298,11 @@ function Database() {
text="We only show a few of the extensions supported by supabase here, but we preinstall many more that you can use right away."
/>
<Link href="/docs/guides/database" passHref>
- <Button as="a" size="small" type="default" icon={<IconArrowUpRight />}>
- Explore documentation
- </Button>
+ <a>
+ <Button size="small" type="default" icon={<IconArrowUpRight />}>
+ Explore documentation
+ </Button>
+ </a>
</Link>
</div>
<div className="col-span-12 mt-8 lg:col-span-6 lg:col-start-7 lg:mt-0">
diff --git a/apps/www/pages/pricing/index.tsx b/apps/www/pages/pricing/index.tsx
index 013b34c1752..a21572a338c 100644
--- a/apps/www/pages/pricing/index.tsx
+++ b/apps/www/pages/pricing/index.tsx
@@ -178,9 +178,11 @@ export default function IndexPage() {
</div>
<p className="p">{description}</p>
<Link href="https://app.supabase.com" passHref>
- <Button as="a" size="medium" block>
- Get started
- </Button>
+ <a>
+ <Button size="medium" block>
+ Get started
+ </Button>
+ </a>
</Link>
</div>
)
diff --git a/apps/www/pages/realtime/Realtime.tsx b/apps/www/pages/realtime/Realtime.tsx
index 890332c1478..ab01e1b7783 100644
--- a/apps/www/pages/realtime/Realtime.tsx
+++ b/apps/www/pages/realtime/Realtime.tsx
@@ -145,9 +145,9 @@ function RealtimePage() {
</p>
<div className="not-prose mt-3">
<Link passHref href="/docs/guides/realtime/postgres-changes">
- <Button as="a" type="default">
- View docs
- </Button>
+ <a>
+ <Button type="default">View docs</Button>
+ </a>
</Link>
</div>
</div>
@@ -163,9 +163,9 @@ function RealtimePage() {
<p>Store and synchronize online user state consistently across clients.</p>
<div className="not-prose mt-3">
<Link passHref href="/docs/guides/realtime/presence">
- <Button as="a" type="default">
- View docs
- </Button>
+ <a>
+ <Button type="default">View docs</Button>
+ </a>
</Link>
</div>
</div>
@@ -181,9 +181,9 @@ function RealtimePage() {
<p>Send any data to any client subscribed to the same Channel.</p>
<div className="not-prose mt-3">
<Link passHref href="/docs/guides/realtime/broadcast">
- <Button as="a" type="default">
- View docs
- </Button>
+ <a>
+ <Button type="default">View docs</Button>
+ </a>
</Link>
</div>
</div>
diff --git a/apps/www/pages/security.mdx b/apps/www/pages/security.mdx
index 2d8f57f2243..5277691489c 100644
--- a/apps/www/pages/security.mdx
+++ b/apps/www/pages/security.mdx
@@ -130,9 +130,11 @@ As a database company, being SOC2 compliant is important when handling sensitive
<div className="not-prose">
<Link passHref href="https://forms.supabase.com/soc2">
- <Button size="medium" type="default" as="a" target="_blank">
- Request SOC2 documents
- </Button>
+ <a target="_blank">
+ <Button size="medium" type="default">
+ Request SOC2 documents
+ </Button>
+ </a>
</Link>
</div>
diff --git a/apps/www/pages/storage/Storage.tsx b/apps/www/pages/storage/Storage.tsx
index e73eb303c40..e6296c35362 100644
--- a/apps/www/pages/storage/Storage.tsx
+++ b/apps/www/pages/storage/Storage.tsx
@@ -188,15 +188,16 @@ function StoragePage() {
text="Serve from the edge to reduce latency."
/>
<Link href="/docs/guides/storage/cdn" passHref>
- <Button
- as="a"
- size="small"
- type="default"
- className="mt-4"
- icon={<IconArrowUpRight />}
- >
- Explore docs
- </Button>
+ <a>
+ <Button
+ size="small"
+ type="default"
+ className="mt-4"
+ icon={<IconArrowUpRight />}
+ >
+ Explore docs
+ </Button>
+ </a>
</Link>
</div>
<div className="col-span-6 lg:col-span-12 xl:col-span-4">
@@ -206,15 +207,16 @@ function StoragePage() {
text="Resize and compress your media before you serve it."
/>
<Link href="/docs/guides/storage/image-transformations" passHref>
- <Button
- as="a"
- size="small"
- type="default"
- className="mt-4"
- icon={<IconArrowUpRight />}
- >
- Explore docs
- </Button>
+ <a>
+ <Button
+ size="small"
+ type="default"
+ className="mt-4"
+ icon={<IconArrowUpRight />}
+ >
+ Explore docs
+ </Button>
+ </a>
</Link>
</div>
</div>,
@@ -252,15 +254,16 @@ function StoragePage() {
</p>
<Link href="/docs/reference/javascript/storage-createbucket" passHref>
- <Button
- as="a"
- size="small"
- type="default"
- className="mt-4"
- icon={<IconArrowUpRight />}
- >
- Explore documentation
- </Button>
+ <a>
+ <Button
+ size="small"
+ type="default"
+ className="mt-4"
+ icon={<IconArrowUpRight />}
+ >
+ Explore documentation
+ </Button>
+ </a>
</Link>
</div>
<div className="col-span-12 lg:col-span-6 lg:col-start-7">
diff --git a/studio/components/interfaces/Functions/TerminalInstructions.tsx b/studio/components/interfaces/Functions/TerminalInstructions.tsx
index a5770812ef0..0a933c1d0b9 100644
--- a/studio/components/interfaces/Functions/TerminalInstructions.tsx
+++ b/studio/components/interfaces/Functions/TerminalInstructions.tsx
@@ -143,7 +143,7 @@ const TerminalInstructions: FC<Props> = ({ closable = false, removeBorder = fals
href="https://github.com/supabase/supabase/tree/master/examples/edge-functions/supabase/functions"
>
<a target="_blank" rel="noreferrer">
- <Button as="a" type="default" iconRight={<IconCode />}>
+ <Button type="default" iconRight={<IconCode />}>
Examples
</Button>
</a>
diff --git a/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx b/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx
index 0436b50b488..7f8bdc90e39 100644
--- a/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx
+++ b/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx
@@ -37,9 +37,11 @@ const HelpPopover: FC<Props> = () => {
</p>
<div className="space-x-1">
<Link passHref href={supportUrl}>
- <Button type="default" icon={<IconMail />} as="a">
- Contact Support
- </Button>
+ <a>
+ <Button type="default" icon={<IconMail />}>
+ Contact Support
+ </Button>
+ </a>
</Link>
<Link passHref href="https://supabase.com/docs/">
<a target="_blank" rel="noreferrer">
diff --git a/studio/pages/join/index.tsx b/studio/pages/join/index.tsx
index 89a7f563bb7..2f462f2f535 100644
--- a/studio/pages/join/index.tsx
+++ b/studio/pages/join/index.tsx
@@ -212,14 +212,14 @@ const JoinOrganizationPage = () => {
</p>
<div className="flex justify-center gap-3">
<Link passHref href={loginRedirectLink}>
- <Button as="a" type="default">
- Sign in
- </Button>
+ <a>
+ <Button type="default">Sign in</Button>
+ </a>
</Link>
<Link passHref href={loginRedirectLink}>
- <Button as="a" type="default">
- Create an account
- </Button>
+ <a>
+ <Button type="default">Create an account</Button>
+ </a>
</Link>
</div>
</div>