Skip to content

Commit 2d094ec

Browse files
authored
improvement(sim-links): drop the leftover fragment around the source actions menu (#9661)
The new-link form moved to the provider root, so the source card's actions menu no longer renders a sibling and needs no fragment.
1 parent 158f5fa commit 2d094ec

1 file changed

Lines changed: 30 additions & 32 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/source-card

‎apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/source-card/source-card.tsx‎

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -80,39 +80,37 @@ function SourceActions({ source, onSummarize }: SourceActionsProps) {
8080
const simLinkOrganizationId = useSimLinkOrganizationId()
8181
const openSimLinkForm = useOpenSimLinkForm()
8282
return (
83-
<>
84-
<DropdownMenu>
85-
<DropdownMenuTrigger asChild>
86-
<Chip
87-
leftIcon={copied ? Check : MoreHorizontal}
88-
aria-label={copied ? 'Link copied' : `Actions for ${sourceLabel(source)}`}
89-
/>
90-
</DropdownMenuTrigger>
91-
<DropdownMenuContent align='end'>
92-
{onSummarize && (
93-
<DropdownMenuItem onSelect={() => onSummarize(source)}>
94-
<Sparkles className='size-[14px]' />
95-
Summarize
96-
</DropdownMenuItem>
97-
)}
98-
<DropdownMenuItem
99-
onSelect={async () => {
100-
if (!(await copy(source.url))) toast.error('Unable to copy link')
101-
}}
102-
>
103-
<LinkIcon className='size-[14px]' />
104-
Copy link
83+
<DropdownMenu>
84+
<DropdownMenuTrigger asChild>
85+
<Chip
86+
leftIcon={copied ? Check : MoreHorizontal}
87+
aria-label={copied ? 'Link copied' : `Actions for ${sourceLabel(source)}`}
88+
/>
89+
</DropdownMenuTrigger>
90+
<DropdownMenuContent align='end'>
91+
{onSummarize && (
92+
<DropdownMenuItem onSelect={() => onSummarize(source)}>
93+
<Sparkles className='size-[14px]' />
94+
Summarize
10595
</DropdownMenuItem>
106-
{simLinkOrganizationId && (
107-
<SimLinkMenuItem
108-
organizationId={simLinkOrganizationId}
109-
url={source.url}
110-
onCreate={() => openSimLinkForm(source.url, sourceLabel(source))}
111-
/>
112-
)}
113-
</DropdownMenuContent>
114-
</DropdownMenu>
115-
</>
96+
)}
97+
<DropdownMenuItem
98+
onSelect={async () => {
99+
if (!(await copy(source.url))) toast.error('Unable to copy link')
100+
}}
101+
>
102+
<LinkIcon className='size-[14px]' />
103+
Copy link
104+
</DropdownMenuItem>
105+
{simLinkOrganizationId && (
106+
<SimLinkMenuItem
107+
organizationId={simLinkOrganizationId}
108+
url={source.url}
109+
onCreate={() => openSimLinkForm(source.url, sourceLabel(source))}
110+
/>
111+
)}
112+
</DropdownMenuContent>
113+
</DropdownMenu>
116114
)
117115
}
118116

0 commit comments

Comments
 (0)