fix(ui): подтверждать копирование community после записи

This commit is contained in:
Denozordec committed 2026-10-04 15:45:56 +07:00
1 parent adfb2fc4c3
commit f515818254
6 files changed
+92 -8

No files matched your search

@@ -66,6 +66,7 @@ const ACTION_COLOR: Record<CommunityRow["action"], string> = {
interface CommunitiesDataGridProps {
communities: CommunityRow[]
selectedId?: string | null
copying?: boolean
copiedValue?: string | null
onSelect: (community: CommunityRow) => void
onCopy: (value: string) => void
@@ -75,6 +76,7 @@ function CommunitiesDataGrid({
communities,
selectedId,
copiedValue,
copying = false,
onSelect,
onCopy,
}: CommunitiesDataGridProps) {
@@ -106,6 +108,7 @@ function CommunitiesDataGrid({
}}
className="size-11 shrink-0 inline-flex items-center justify-center rounded text-muted-foreground hover:bg-muted"
aria-label={`Скопировать community: ${c.value}`}
disabled={copying}
>
{copiedValue === c.value ? (
<CheckIcon className="size-3" />
@@ -230,7 +233,7 @@ function CommunitiesDataGrid({
},
},
],
[copiedValue, onCopy, onSelect],
[copiedValue, copying, onCopy, onSelect],
)
const rowSelection = useMemo(