import { ReactNode } from 'react'; import { Row, Text, Icon, DataTable, DataColumn, MenuItem } from '@umami/react-zen'; import { useMessages, useNavigation } from '@/components/hooks'; import { MenuButton } from '@/components/input/MenuButton'; import { Eye, SquarePen } from '@/components/icons'; import { Empty } from '@/components/common/Empty'; export function WebsitesTable({ data = [], showActions, allowEdit, allowView, renderLink, }: { data: Record[]; showActions?: boolean; allowEdit?: boolean; allowView?: boolean; renderLink?: (row: any) => ReactNode; }) { const { formatMessage, labels } = useMessages(); const { renderUrl } = useNavigation(); if (data.length === 0) { return ; } return ( {renderLink} {showActions && ( {(row: any) => { const websiteId = row.id; return ( {allowView && ( {formatMessage(labels.view)} )} {allowEdit && ( {formatMessage(labels.edit)} )} ); }} )} ); }