fix: user cannot click on copy icon of model id (#2744)

Signed-off-by: James <james@jan.ai>
Co-authored-by: James <james@jan.ai>
This commit is contained in:
NamH 2024-04-17 15:57:19 +07:00 committed by GitHub
parent af9a35110b
commit 83f9e965d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -278,21 +278,6 @@ const DropdownListSidebar = ({
)}
>
<p className="line-clamp-2 text-xs">{x.id}</p>
{clipboard.copied && copyId === x.id ? (
<CheckIcon
size={16}
className="flex-shrink-0 text-green-600"
/>
) : (
<CopyIcon
size={16}
className="z-20 flex-shrink-0 cursor-pointer"
onClick={() => {
clipboard.copy(x.id)
setCopyId(x.id)
}}
/>
)}
</div>
</div>
<div className="flex-shrink-0 space-x-2">
@ -305,6 +290,27 @@ const DropdownListSidebar = ({
</div>
</div>
</SelectItem>
<div
className={twMerge(
'absolute -mt-6 ml-4 flex max-w-[200px] items-center space-x-2 text-muted-foreground'
)}
>
<p className="line-clamp-1 flex-1 text-xs text-transparent">
{x.id}
</p>
{clipboard.copied && copyId === x.id ? (
<CheckIcon size={16} className="text-green-600" />
) : (
<CopyIcon
size={16}
className="z-20 cursor-pointer"
onClick={() => {
clipboard.copy(x.id)
setCopyId(x.id)
}}
/>
)}
</div>
</div>
))
)}