Skip to content

Commit 3129309

Browse files
committed
refactor(tables): reuse clipboard helper
1 parent 37034a3 commit 3129309

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-grid.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import type React from 'react'
44
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'
5-
import { cn, toast, useToast } from '@sim/emcn'
5+
import { cn, toast, useToast, writeTextToClipboard } from '@sim/emcn'
66
import { Loader, TableX } from '@sim/emcn/icons'
77
import { createLogger } from '@sim/logger'
88
import type { TableCellSelection } from '@sim/realtime-protocol/table-presence'
@@ -1769,7 +1769,7 @@ export function TableGrid({
17691769
function handleCopyRowId() {
17701770
const rowId = contextMenu.row?.id
17711771
if (!rowId) return
1772-
void navigator.clipboard.writeText(rowId).catch(() => {})
1772+
void writeTextToClipboard(rowId).catch(() => {})
17731773
}
17741774

17751775
const handleGoToReferenceTable = useCallback(

0 commit comments

Comments
 (0)