Skip to content

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

fix: remove redundant feature preview click (#37019)

Pamela Chiae7c3cd45df0d
diff --git a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsx b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsx
index 725499cb60d..bfa693f84b2 100644
--- a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsx
+++ b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsx
@@ -1,6 +1,6 @@
import { ExternalLink, Eye, EyeOff, FlaskConical } from 'lucide-react'
import Link from 'next/link'
-import { ReactNode, useEffect } from 'react'
+import { ReactNode } from 'react'
import { LOCAL_STORAGE_KEYS, useParams } from 'common'
import { useSendEventMutation } from 'data/telemetry/send-event-mutation'
@@ -63,15 +63,6 @@ const FeaturePreviewModal = () => {
snap.setShowFeaturePreviewModal(false)
}
- useEffect(() => {
- if (snap.showFeaturePreviewModal) {
- sendEvent({
- action: 'feature_previews_clicked',
- groups: { project: ref ?? 'Unknown', organization: org?.slug ?? 'Unknown' },
- })
- }
- }, [snap.showFeaturePreviewModal])
-
return (
<Modal
hideFooter
diff --git a/packages/common/telemetry-constants.ts b/packages/common/telemetry-constants.ts
index f4de3a9fca3..76307852779 100644
--- a/packages/common/telemetry-constants.ts
+++ b/packages/common/telemetry-constants.ts
@@ -197,22 +197,6 @@ export interface CronJobHistoryClickedEvent {
}
}
-/**
- * The FeaturePreviewModal was opened.
- *
- * The FeaturePreviewModal can be opened clicking at the profile icon at the bottom left corner of the project sidebar.
- *
- * @group Events
- * @source studio
- */
-export interface FeaturePreviewsClickedEvent {
- action: 'feature_previews_clicked'
- groups: {
- project: string
- organization: string
- }
-}
-
/**
* A feature preview was enabled by the user through the FeaturePreviewModal.
*
@@ -1355,7 +1339,6 @@ export type TelemetryEvent =
| CronJobUpdateClickedEvent
| CronJobDeleteClickedEvent
| CronJobHistoryClickedEvent
- | FeaturePreviewsClickedEvent
| FeaturePreviewEnabledEvent
| FeaturePreviewDisabledEvent
| ProjectCreationSimpleVersionSubmittedEvent