Skip to content

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

make sure slug is always defined

Jonathan Summers-Muir0cf9b533ec06
diff --git a/studio/components/ui/PageTelemetry.tsx b/studio/components/ui/PageTelemetry.tsx
index a39c4a73e1b..81103f87293 100644
--- a/studio/components/ui/PageTelemetry.tsx
+++ b/studio/components/ui/PageTelemetry.tsx
@@ -1,4 +1,5 @@
import { useParams, useTelemetryProps } from 'common'
+import { useSelectedOrganization } from 'hooks'
import { post } from 'lib/common/fetch'
import { API_URL, IS_PLATFORM } from 'lib/constants'
import { observer } from 'mobx-react-lite'
@@ -7,8 +8,9 @@ import { FC, useEffect } from 'react'
const PageTelemetry: FC = ({ children }) => {
const router = useRouter()
- const { slug, ref } = useParams()
+ const { ref } = useParams()
const telemetryProps = useTelemetryProps()
+ const selectedOrganization = useSelectedOrganization()
useEffect(() => {
function handleRouteChange(url: string) {
@@ -58,7 +60,7 @@ const PageTelemetry: FC = ({ children }) => {
post(`${API_URL}/telemetry/pageview`, {
...(ref && { projectRef: ref }),
- ...(slug && { orgSlug: slug }),
+ ...(selectedOrganization && { orgSlug: selectedOrganization.slug }),
referrer: referrer,
title: document.title,
path: router.route,