Skip to content

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

NewProjectPanel link to /templates instead of /new based on AI flag

Joshen Limd1a7ba3279bc
diff --git a/studio/components/interfaces/Home/NewProjectPanel/NewProjectPanel.tsx b/studio/components/interfaces/Home/NewProjectPanel/NewProjectPanel.tsx
index f191bca0397..fd04b25dd1a 100644
--- a/studio/components/interfaces/Home/NewProjectPanel/NewProjectPanel.tsx
+++ b/studio/components/interfaces/Home/NewProjectPanel/NewProjectPanel.tsx
@@ -4,12 +4,14 @@ import SVG from 'react-inlinesvg'
import { Button, IconActivity, IconArchive, IconCode, IconExternalLink, IconKey } from 'ui'
import Panel from 'components/ui/Panel'
+import { useFlag } from 'hooks'
import APIKeys from './APIKeys'
import GetStartedHero from './GetStartedHero'
const NewProjectPanel = () => {
const router = useRouter()
const { ref } = router.query
+ const supabaseAIEnabled = useFlag('sqlEditorSupabaseAI')
return (
<div className="grid grid-cols-12 gap-4 lg:gap-20">
@@ -56,7 +58,11 @@ const NewProjectPanel = () => {
</Button>
</a>
</Link>
- <Link href={`/project/${ref}/sql/new`}>
+ <Link
+ href={
+ supabaseAIEnabled ? `/project/${ref}/sql/new` : `/project/${ref}/sql/templates`
+ }
+ >
<a>
<Button
type="default"