Skip to content

Commit f638e94

Browse files
committed
fix confluence
1 parent a77f0c5 commit f638e94

1 file changed

Lines changed: 1 addition & 61 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/file-selector/components

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel-new/components/editor/components/sub-block/components/file-selector/components/confluence-file-selector.tsx

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client'
22

33
import { useCallback, useEffect, useRef, useState } from 'react'
4-
import { Check, ChevronDown, ExternalLink, RefreshCw, X } from 'lucide-react'
4+
import { Check, ChevronDown, RefreshCw } from 'lucide-react'
55
import { ConfluenceIcon } from '@/components/icons'
66
import { Button } from '@/components/ui/button'
77
import {
@@ -375,21 +375,6 @@ export function ConfluenceFileSelector({
375375
}
376376
}
377377

378-
// Fetch the selected page metadata once credentials and domain are ready or changed
379-
useEffect(() => {
380-
if (value && selectedCredentialId && !selectedFile && domain && domain.includes('.')) {
381-
fetchPageInfo(value)
382-
}
383-
}, [
384-
value,
385-
selectedCredentialId,
386-
selectedFile,
387-
domain,
388-
fetchPageInfo,
389-
workflowId,
390-
isForeignCredential,
391-
])
392-
393378
// Keep internal selectedFileId in sync with the value prop
394379
useEffect(() => {
395380
if (value !== selectedFileId) {
@@ -571,51 +556,6 @@ export function ConfluenceFileSelector({
571556
</PopoverContent>
572557
)}
573558
</Popover>
574-
575-
{/* File preview */}
576-
{showPreview && selectedFile && selectedFileId && selectedFile.id === selectedFileId && (
577-
<div className='relative mt-2 rounded-md border border-muted bg-muted/10 p-2'>
578-
<div className='absolute top-2 right-2'>
579-
<Button
580-
variant='ghost'
581-
size='icon'
582-
className='h-5 w-5 hover:bg-muted'
583-
onClick={handleClearSelection}
584-
>
585-
<X className='h-3 w-3' />
586-
</Button>
587-
</div>
588-
<div className='flex items-center gap-3 pr-4'>
589-
<div className='flex h-6 w-6 flex-shrink-0 items-center justify-center rounded bg-muted/20'>
590-
<ConfluenceIcon className='h-4 w-4' />
591-
</div>
592-
<div className='min-w-0 flex-1 overflow-hidden'>
593-
<div className='flex items-center gap-2'>
594-
<h4 className='truncate font-medium text-xs'>{selectedFile.name}</h4>
595-
{selectedFile.modifiedTime && (
596-
<span className='whitespace-nowrap text-muted-foreground text-xs'>
597-
{new Date(selectedFile.modifiedTime).toLocaleDateString()}
598-
</span>
599-
)}
600-
</div>
601-
{selectedFile.webViewLink ? (
602-
<a
603-
href={selectedFile.webViewLink}
604-
target='_blank'
605-
rel='noopener noreferrer'
606-
className='flex items-center gap-1 text-foreground text-xs hover:underline'
607-
onClick={(e) => e.stopPropagation()}
608-
>
609-
<span>Open in Confluence</span>
610-
<ExternalLink className='h-3 w-3' />
611-
</a>
612-
) : (
613-
<></>
614-
)}
615-
</div>
616-
</div>
617-
</div>
618-
)}
619559
</div>
620560

621561
{showOAuthModal && (

0 commit comments

Comments
 (0)