import { ReactNode } from 'react'; import { Text, Icon, Icons, GridTable, GridColumn, useBreakpoint } from 'react-basics'; import { useMessages, useTeamUrl } from 'components/hooks'; import LinkButton from 'components/common/LinkButton'; 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 breakpoint = useBreakpoint(); const { renderTeamUrl } = useTeamUrl(); return ( {showActions && ( {row => { const { id: websiteId } = row; return ( <> {allowEdit && ( {formatMessage(labels.edit)} )} {allowView && ( {formatMessage(labels.view)} )} ); }} )} {children} ); } export default WebsitesTable;