import { ReactNode } from 'react'; import Link from 'next/link'; import { Button, Text, Icon, Icons, GridTable, GridColumn, useBreakpoint } from 'react-basics'; import { useMessages, useLogin, useTeamContext } from 'components/hooks'; export interface WebsitesTableProps { data: any[]; showActions?: boolean; allowEdit?: boolean; allowView?: boolean; teamId?: string; children?: ReactNode; } export function WebsitesTable({ data = [], showActions, allowEdit, allowView, teamId, children, }: WebsitesTableProps) { const { formatMessage, labels } = useMessages(); const { user } = useLogin(); const breakpoint = useBreakpoint(); const { renderTeamUrl } = useTeamContext(); return ( {showActions && ( {row => { const { id } = row; return ( <> {allowEdit && (teamId || user.isAdmin) && ( )} {allowView && ( )} ); }} )} {children} ); } export default WebsitesTable;