Skip to content

Commit 96e44fc

Browse files
committed
Only track opening the tooltip when it actually opens
1 parent 23699a5 commit 96e44fc

File tree

1 file changed

+4
-5
lines changed
  • packages/app/src/app/pages/Sandbox/Editor/Header/PrivacyTooltip

1 file changed

+4
-5
lines changed

packages/app/src/app/pages/Sandbox/Editor/Header/PrivacyTooltip/index.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect } from 'react';
1+
import React from 'react';
22
import { useOvermind } from 'app/overmind';
33
import { ThemeProvider } from 'styled-components';
44
import Tooltip from '@codesandbox/common/lib/components/Tooltip';
@@ -20,10 +20,6 @@ export const PrivacyTooltip = () => {
2020
},
2121
} = useOvermind();
2222

23-
useEffect(() => {
24-
track('Open Sandbox Privacy Tooltip', { owned });
25-
}, [owned]);
26-
2723
const config = {
2824
0: {
2925
description: 'Everyone can see this Sandbox',
@@ -54,6 +50,9 @@ export const PrivacyTooltip = () => {
5450
<Tooltip
5551
delay={0}
5652
interactive
53+
onShown={() => {
54+
track('Open Sandbox Privacy Tooltip', { owned });
55+
}}
5756
content={
5857
<>
5958
<Text size="3" marginBottom={4}>

0 commit comments

Comments
 (0)