Skip to content

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

feat: Link from dashboard to extension docs #15415

GeekyAdams6789079aeed8
diff --git a/studio/components/interfaces/Database/Extensions/ExtensionCard.tsx b/studio/components/interfaces/Database/Extensions/ExtensionCard.tsx
index f7f3337f962..633fa5acd99 100644
--- a/studio/components/interfaces/Database/Extensions/ExtensionCard.tsx
+++ b/studio/components/interfaces/Database/Extensions/ExtensionCard.tsx
@@ -1,7 +1,8 @@
import { FC, useState } from 'react'
import { observer } from 'mobx-react-lite'
-import { Badge, IconLoader, Toggle } from 'ui'
+import { Badge, IconLoader, Toggle, IconExternalLink } from 'ui'
import { PermissionAction } from '@supabase/shared-types/out/constants'
+import Link from 'next/link'
import { checkPermissions, useStore } from 'hooks'
import { confirmAlert } from 'components/to-be-cleaned/ModalsDeprecated/ConfirmModal'
@@ -69,15 +70,29 @@ const ExtensionCard: FC<Props> = ({ extension }) => {
<div
className={[
'border-panel-border-light bg-panel-header-light dark:bg-panel-header-dark',
- 'flex border-b p-4 px-6 dark:border-panel-border-dark',
+ 'flex justify-between w-full border-b p-4 px-6 dark:border-panel-border-dark',
].join(' ')}
>
- <h3
- title={extension.name}
- className="m-0 h-5 flex-1 truncate text-base uppercase text-scale-1200"
+ <Link
+ href={
+ extension.link ||
+ `https://supabase.com/docs/guides/database/extensions/${extension.name}`
+ }
>
- {extension.name}
- </h3>
+ <a className="max-w-[85%] cursor-default" target="_blank" rel="noreferrer">
+ <div className="flex flex-row items-center">
+ <h3
+ title={extension.name}
+ className="h-5 m-0 text-base uppercase truncate cursor-pointer text-scale-1200"
+ >
+ {extension.name}
+ </h3>
+
+ <IconExternalLink className="ml-2.5 cursor-pointer" size={18} />
+ </div>
+ </a>
+ </Link>
+
{loading ? (
<IconLoader className="animate-spin" size={16} />
) : (
@@ -100,7 +115,7 @@ const ExtensionCard: FC<Props> = ({ extension }) => {
</div>
{isOn && extension.schema && (
<div className="p-4 px-6">
- <div className="flex flex-grow items-center space-x-2 text-sm text-scale-1100">
+ <div className="flex items-center flex-grow space-x-2 text-sm text-scale-1100">
<span>Schema:</span>
<Badge>{`${extension.schema}`}</Badge>
</div>
diff --git a/studio/pages/project/[ref]/index.tsx b/studio/pages/project/[ref]/index.tsx
index f380381c48c..830dd12418b 100644
--- a/studio/pages/project/[ref]/index.tsx
+++ b/studio/pages/project/[ref]/index.tsx
@@ -1,3 +1,4 @@
+import ExtensionCard from 'components/interfaces/Database/Extensions/ExtensionCard'
import { ClientLibrary, ExampleProject } from 'components/interfaces/Home'
import { CLIENT_LIBRARIES, EXAMPLE_PROJECTS } from 'components/interfaces/Home/Home.constants'
import ProjectUsageSection from 'components/interfaces/Home/ProjectUsageSection'
@@ -18,8 +19,8 @@ const Home: NextPageWithLayout = () => {
: 'Welcome to your project'
return (
- <div className="mx-auto my-16 w-full max-w-7xl space-y-16">
- <div className="mx-6 flex items-center space-x-6">
+ <div className="w-full mx-auto my-16 space-y-16 max-w-7xl">
+ <div className="flex items-center mx-6 space-x-6">
<h1 className="text-3xl">{projectName}</h1>
</div>
@@ -41,7 +42,7 @@ const Home: NextPageWithLayout = () => {
<div className="mx-6">
<h4 className="text-lg">Client libraries</h4>
</div>
- <div className="mx-6 mb-12 grid gap-12 md:grid-cols-3">
+ <div className="grid gap-12 mx-6 mb-12 md:grid-cols-3">
{CLIENT_LIBRARIES.map((library) => (
<ClientLibrary key={library.language} {...library} />
))}
@@ -51,7 +52,7 @@ const Home: NextPageWithLayout = () => {
<div className="mx-6">
<h4 className="text-lg">Example projects</h4>
</div>
- <div className="mx-6 grid gap-8 md:grid-cols-2 lg:grid-cols-3">
+ <div className="grid gap-8 mx-6 md:grid-cols-2 lg:grid-cols-3">
{EXAMPLE_PROJECTS.sort((a, b) => a.title.localeCompare(b.title)).map((project) => (
<ExampleProject key={project.url} {...project} />
))}