Skip to content

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

Add realtime explore button (#23404)

Joshen Lim7ad6594648a1
diff --git a/apps/studio/components/interfaces/Home/NewProjectPanel/NewProjectPanel.tsx b/apps/studio/components/interfaces/Home/NewProjectPanel/NewProjectPanel.tsx
index 122e549468a..0ef1e55ef12 100644
--- a/apps/studio/components/interfaces/Home/NewProjectPanel/NewProjectPanel.tsx
+++ b/apps/studio/components/interfaces/Home/NewProjectPanel/NewProjectPanel.tsx
@@ -1,10 +1,11 @@
+import { ExternalLink } from 'lucide-react'
import Link from 'next/link'
import { useRouter } from 'next/router'
-import SVG from 'react-inlinesvg'
-import { Button, IconActivity, IconArchive, IconCode, IconExternalLink, IconKey } from 'ui'
+import { Button } from 'ui'
import Panel from 'components/ui/Panel'
import { useIsFeatureEnabled } from 'hooks'
+import { Auth, EdgeFunctions, Realtime, SqlEditor, Storage, TableEditor } from 'icons'
import APIKeys from './APIKeys'
import GetStartedHero from './GetStartedHero'
@@ -45,37 +46,13 @@ const NewProjectPanel = () => {
</p>
</div>
<div className="flex flex-wrap items-center gap-2">
- <Button
- asChild
- type="default"
- icon={
- <SVG
- src={`${router.basePath}/img/table-editor.svg`}
- style={{ width: `${14}px`, height: `${14}px` }}
- preProcessor={(code) =>
- code.replace(/svg/, 'svg class="m-auto text-color-inherit"')
- }
- />
- }
- >
+ <Button asChild type="default" icon={<TableEditor strokeWidth={1.5} />}>
<Link href={`/project/${ref}/editor`}>Table Editor</Link>
</Button>
- <Button
- asChild
- type="default"
- icon={
- <SVG
- src={`${router.basePath}/img/sql-editor.svg`}
- style={{ width: `${14}px`, height: `${14}px` }}
- preProcessor={(code) =>
- code.replace(/svg/, 'svg class="m-auto text-color-inherit"')
- }
- />
- }
- >
+ <Button asChild type="default" icon={<SqlEditor strokeWidth={1.5} />}>
<Link href={`/project/${ref}/sql/new`}>SQL editor</Link>
</Button>
- <Button asChild type="default" icon={<IconExternalLink size={14} />}>
+ <Button asChild type="default" icon={<ExternalLink size={14} />}>
<Link
href="https://supabase.com/docs/guides/database"
target="_blank"
@@ -105,7 +82,7 @@ const NewProjectPanel = () => {
<Panel.Content className="flex flex-col space-y-4 md:px-3">
<div className="flex items-center space-x-3">
<div className="rounded bg-surface-300 p-1.5 text-foreground-light shadow-sm">
- <IconKey strokeWidth={2} size={16} />
+ <Auth size={16} strokeWidth={1.5} />
</div>
<h5>Authentication</h5>
</div>
@@ -121,7 +98,7 @@ const NewProjectPanel = () => {
<Button
className="translate-y-[1px]"
- icon={<IconExternalLink size={14} />}
+ icon={<ExternalLink size={14} />}
type="default"
asChild
>
@@ -141,7 +118,7 @@ const NewProjectPanel = () => {
<Panel.Content className="flex flex-col space-y-4 md:px-3">
<div className="flex items-center space-x-3">
<div className="rounded bg-surface-300 p-1.5 text-foreground-light shadow-sm">
- <IconArchive strokeWidth={2} size={16} />
+ <Storage size={16} strokeWidth={1.5} />
</div>
<h5>Storage</h5>
</div>
@@ -157,7 +134,7 @@ const NewProjectPanel = () => {
<Button
className="translate-y-[1px]"
- icon={<IconExternalLink size={14} />}
+ icon={<ExternalLink size={14} />}
type="default"
asChild
>
@@ -177,7 +154,7 @@ const NewProjectPanel = () => {
<Panel.Content className="flex flex-col space-y-4 md:px-3">
<div className="flex items-center space-x-3">
<div className="rounded bg-surface-300 p-1.5 text-foreground-light shadow-sm">
- <IconCode strokeWidth={2} size={16} />
+ <EdgeFunctions size={16} strokeWidth={1.5} />
</div>
<h5>Edge Functions</h5>
</div>
@@ -193,7 +170,7 @@ const NewProjectPanel = () => {
</Button>
<Button
className="translate-y-[1px]"
- icon={<IconExternalLink size={14} />}
+ icon={<ExternalLink size={14} />}
type="default"
asChild
>
@@ -212,7 +189,7 @@ const NewProjectPanel = () => {
<Panel.Content className="flex flex-col space-y-4 md:px-3">
<div className="flex items-center space-x-4">
<div className="rounded bg-surface-300 p-1.5 text-foreground-light shadow-sm">
- <IconActivity strokeWidth={2} size={16} />
+ <Realtime size={16} strokeWidth={1.5} />
</div>
<h5>Realtime</h5>
</div>
@@ -222,9 +199,12 @@ const NewProjectPanel = () => {
</p>
</div>
<div className="flex items-center space-x-2">
+ <Button type="default" asChild>
+ <Link href={`/project/${ref}/realtime/inspector`}>Explore Realtime</Link>
+ </Button>
<Button
className="translate-y-[1px]"
- icon={<IconExternalLink size={14} />}
+ icon={<ExternalLink size={14} />}
type="default"
asChild
>
@@ -265,12 +245,7 @@ const NewProjectPanel = () => {
<Button asChild type="default">
<Link href={`/project/${ref}/settings/api`}>View API settings</Link>
</Button>
- <Button
- asChild
- className="translate-y-[1px]"
- type="default"
- icon={<IconExternalLink />}
- >
+ <Button asChild className="translate-y-[1px]" type="default" icon={<ExternalLink />}>
<Link
href="https://supabase.com/docs/guides/database/api"
target="_blank"