Skip to content

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

fix: use parent ref for contact support button when in a branch (#28207)

Alaister Young9d5d4626ef87
diff --git a/apps/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx b/apps/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx
index 4a65425fbeb..b4788de0e29 100644
--- a/apps/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx
+++ b/apps/studio/components/layouts/ProjectLayout/LayoutHeader/HelpPopover.tsx
@@ -3,6 +3,7 @@ import Image from 'next/legacy/image'
import Link from 'next/link'
import { useRouter } from 'next/router'
import SVG from 'react-inlinesvg'
+
import {
Button,
IconActivity,
@@ -16,10 +17,12 @@ import {
PopoverTrigger_Shadcn_,
Popover_Shadcn_,
} from 'ui'
+import { useProjectContext } from '../ProjectContext'
const HelpPopover = () => {
const router = useRouter()
- const projectRef = router.query.ref
+ const { project } = useProjectContext()
+ const projectRef = project?.parent_project_ref ?? router.query.ref
const supportUrl = `/support/new${projectRef ? `?ref=${projectRef}` : ''}`
return (