@@ -25,7 +25,6 @@ const Content: React.FC<ContentProps> = ({ isExpanded, showChatBot, openChatBot
2525 const [ showAlert , setShowAlert ] = useState < boolean > ( false ) ;
2626 const [ viewPoint , setViewPoint ] = useState < 'tableView' | 'showGraphView' > ( 'tableView' ) ;
2727
28-
2928 useEffect ( ( ) => {
3029 if ( ! init ) {
3130 let session = localStorage . getItem ( 'neo4j.connection' ) ;
@@ -37,16 +36,19 @@ const Content: React.FC<ContentProps> = ({ isExpanded, showChatBot, openChatBot
3736 password : neo4jConnection . password ,
3837 database : neo4jConnection . database ,
3938 } ) ;
40- initialiseDriver ( neo4jConnection . uri , neo4jConnection . user , neo4jConnection . password , neo4jConnection . database ) . then (
41- ( driver : Driver ) => {
42- if ( driver ) {
43- setConnectionStatus ( true ) ;
44- setDriver ( driver ) ;
45- } else {
46- setConnectionStatus ( false ) ;
47- }
39+ initialiseDriver (
40+ neo4jConnection . uri ,
41+ neo4jConnection . user ,
42+ neo4jConnection . password ,
43+ neo4jConnection . database
44+ ) . then ( ( driver : Driver ) => {
45+ if ( driver ) {
46+ setConnectionStatus ( true ) ;
47+ setDriver ( driver ) ;
48+ } else {
49+ setConnectionStatus ( false ) ;
4850 }
49- ) ;
51+ } ) ;
5052 } else {
5153 setOpenConnection ( true ) ;
5254 }
@@ -189,8 +191,9 @@ const Content: React.FC<ContentProps> = ({ isExpanded, showChatBot, openChatBot
189191
190192 const handleOpenGraphClick = ( ) => {
191193 const bloomUrl = process . env . BLOOM_URL ;
192- const connectURL = `${ userCredentials ?. userName } @${ localStorage . getItem ( 'URI' ) } %3A${ localStorage . getItem ( 'port' ) ?? '7687'
193- } `;
194+ const connectURL = `${ userCredentials ?. userName } @${ localStorage . getItem ( 'URI' ) } %3A${
195+ localStorage . getItem ( 'port' ) ?? '7687'
196+ } `;
194197 const encodedURL = encodeURIComponent ( connectURL ) ;
195198 const replacedUrl = bloomUrl ?. replace ( '{CONNECT_URL}' , encodedURL ) ;
196199 window . open ( replacedUrl , '_blank' ) ;
@@ -200,10 +203,10 @@ const Content: React.FC<ContentProps> = ({ isExpanded, showChatBot, openChatBot
200203 isExpanded && showChatBot
201204 ? 'contentWithBothDrawers'
202205 : isExpanded
203- ? 'contentWithExpansion'
204- : showChatBot
205- ? 'contentWithChatBot'
206- : 'contentWithNoExpansion' ;
206+ ? 'contentWithExpansion'
207+ : showChatBot
208+ ? 'contentWithChatBot'
209+ : 'contentWithNoExpansion' ;
207210
208211 const handleGraphView = ( ) => {
209212 setOpenGraphView ( true ) ;
0 commit comments