Skip to content

Commit e566862

Browse files
GraphEnhancement button
1 parent a6768a9 commit e566862

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

frontend/src/components/Content.tsx

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,8 @@ const Content: React.FC<ContentProps> = ({
286286
const handleOpenGraphClick = () => {
287287
const bloomUrl = process.env.BLOOM_URL;
288288
const uriCoded = userCredentials?.uri.replace(/:\d+$/, '');
289-
const connectURL = `${uriCoded?.split('//')[0]}//${userCredentials?.userName}@${uriCoded?.split('//')[1]}:${
290-
userCredentials?.port ?? '7687'
291-
}`;
289+
const connectURL = `${uriCoded?.split('//')[0]}//${userCredentials?.userName}@${uriCoded?.split('//')[1]}:${userCredentials?.port ?? '7687'
290+
}`;
292291
const encodedURL = encodeURIComponent(connectURL);
293292
const replacedUrl = bloomUrl?.replace('{CONNECT_URL}', encodedURL);
294293
window.open(replacedUrl, '_blank');
@@ -298,10 +297,10 @@ const Content: React.FC<ContentProps> = ({
298297
isLeftExpanded && isRightExpanded
299298
? 'contentWithExpansion'
300299
: isRightExpanded
301-
? 'contentWithChatBot'
302-
: !isLeftExpanded && !isRightExpanded
303-
? 'w-[calc(100%-128px)]'
304-
: 'contentWithDropzoneExpansion';
300+
? 'contentWithChatBot'
301+
: !isLeftExpanded && !isRightExpanded
302+
? 'w-[calc(100%-128px)]'
303+
: 'contentWithDropzoneExpansion';
305304

306305
const handleGraphView = () => {
307306
setOpenGraphView(true);
@@ -627,20 +626,20 @@ const Content: React.FC<ContentProps> = ({
627626
</div>
628627
</Typography>
629628
</div>
630-
{!connectionStatus ? (
631-
<Button className='mr-2.5' onClick={() => setOpenConnection(true)}>
632-
{buttonCaptions.connectToNeo4j}
629+
<div>
630+
<Button className='mr-2.5' onClick={openGraphEnhancementDialog} disabled={!connectionStatus}>
631+
Graph Enhancement
633632
</Button>
634-
) : (
635-
<div>
636-
<Button className='mr-2.5' onClick={openGraphEnhancementDialog}>
637-
Graph Enhancement
633+
{!connectionStatus ? (
634+
<Button className='mr-2.5' onClick={() => setOpenConnection(true)}>
635+
{buttonCaptions.connectToNeo4j}
638636
</Button>
637+
) : (
639638
<Button className='mr-2.5' onClick={disconnect}>
640639
{buttonCaptions.disconnect}
641640
</Button>
642-
</div>
643-
)}
641+
)}
642+
</div>
644643
</Flex>
645644
<FileTable
646645
isExpanded={isLeftExpanded && isRightExpanded}
@@ -654,9 +653,8 @@ const Content: React.FC<ContentProps> = ({
654653
ref={childRef}
655654
></FileTable>
656655
<Flex
657-
className={`${
658-
!isLeftExpanded && !isRightExpanded ? 'w-[calc(100%-128px)]' : 'w-full'
659-
} p-2.5 absolute bottom-4 mt-1.5 self-start`}
656+
className={`${!isLeftExpanded && !isRightExpanded ? 'w-[calc(100%-128px)]' : 'w-full'
657+
} p-2.5 absolute bottom-4 mt-1.5 self-start`}
660658
justifyContent='space-between'
661659
flexDirection='row'
662660
>

0 commit comments

Comments
 (0)