File tree Expand file tree Collapse file tree 2 files changed +8
-14
lines changed
compass/src/app/components Expand file tree Collapse file tree 2 files changed +8
-14
lines changed Original file line number Diff line number Diff line change 1- import { useConnectionIds } from '@mongodb-js/compass-connections /provider' ;
1+ import { useHasNonGenuineConnections } from '@mongodb-js/compass-app-stores /provider' ;
22import React from 'react' ;
33import { CompassAssistantDrawer } from '@mongodb-js/compass-assistant' ;
44
@@ -10,15 +10,12 @@ export function CompassAssistantDrawerWithConnections({
1010} : {
1111 appName : string ;
1212} ) {
13- // Check for non-genuine connections
14- const activeNonGenuineConnectionIds = useConnectionIds (
15- ( conn ) =>
16- conn . info . isGenuineMongoDB === false && conn . status === 'connected'
17- ) ;
13+ const hasNonGenuineConnections = useHasNonGenuineConnections ( ) ;
14+
1815 return (
1916 < CompassAssistantDrawer
2017 appName = { appName }
21- hasNonGenuineConnections = { activeNonGenuineConnectionIds . length > 0 }
18+ hasNonGenuineConnections = { hasNonGenuineConnections }
2219 />
2320 ) ;
2421}
Original file line number Diff line number Diff line change 1- import { useConnectionIds } from '@mongodb-js/compass-connections /provider' ;
1+ import { useHasNonGenuineConnections } from '@mongodb-js/compass-app-stores /provider' ;
22import React from 'react' ;
33import { CompassAssistantDrawer } from '@mongodb-js/compass-assistant' ;
44
@@ -10,15 +10,12 @@ export function CompassAssistantDrawerWithConnections({
1010} : {
1111 appName : string ;
1212} ) {
13- // Check for non-genuine connections
14- const activeNonGenuineConnectionIds = useConnectionIds (
15- ( conn ) =>
16- conn . info . isGenuineMongoDB === false && conn . status === 'connected'
17- ) ;
13+ const hasNonGenuineConnections = useHasNonGenuineConnections ( ) ;
14+
1815 return (
1916 < CompassAssistantDrawer
2017 appName = { appName }
21- hasNonGenuineConnections = { activeNonGenuineConnectionIds . length > 0 }
18+ hasNonGenuineConnections = { hasNonGenuineConnections }
2219 />
2320 ) ;
2421}
You can’t perform that action at this time.
0 commit comments