File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,11 @@ import {
1515 DatabasesWorkspaceTab ,
1616 CollectionsWorkspaceTab ,
1717} from '@mongodb-js/compass-databases-collections' ;
18- import { CompassComponentsProvider , css } from '@mongodb-js/compass-components' ;
18+ import {
19+ CompassComponentsProvider ,
20+ css ,
21+ usePersistedState ,
22+ } from '@mongodb-js/compass-components' ;
1923import {
2024 WorkspaceTab as CollectionWorkspace ,
2125 CollectionTabsProvider ,
@@ -262,6 +266,9 @@ const CompassWeb = ({
262266 onLog,
263267 onDebug,
264268 } ) ;
269+ const [ telemetryAnonymousId ] = usePersistedState ( 'telemetryAnonymousId' , ( ) =>
270+ new UUID ( ) . toString ( )
271+ ) ;
265272
266273 const preferencesAccess = useRef (
267274 new CompassWebPreferencesAccess ( {
@@ -285,7 +292,7 @@ const CompassWeb = ({
285292 enableCreatingNewConnections : false ,
286293 enableGlobalWrites : false ,
287294 optInDataExplorerGenAIFeatures : false ,
288- telemetryAnonymousId : new UUID ( ) . toString ( ) ,
295+ telemetryAnonymousId,
289296 ...initialPreferences ,
290297 } )
291298 ) ;
You can’t perform that action at this time.
0 commit comments