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 { Lucide } from '@/components/icons'; import Link from 'next/link'; export interface WebsitesTableProps { data: any[]; showActions?: boolean; allowEdit?: boolean; allowView?: boolean; teamId?: string; children?: ReactNode; } export function WebsitesTable({ data = [], showActions, allowEdit, allowView, children, }: WebsitesTableProps) { const { formatMessage, labels } = useMessages(); const { renderTeamUrl } = useNavigation(); if (!data?.length) { return children; } return ( {(row: any) => {row.name}} {showActions && ( {(row: any) => { const websiteId = row.id; return ( {allowEdit && ( {formatMessage(labels.view)} )} {allowView && ( {formatMessage(labels.edit)} )} ); }} )} ); }