import { FC, Fragment, memo, PropsWithChildren } from 'react' import { WebsiteCellDashboard } from '@app/components/general/cells' import { Website } from '@app/types' import { listStyle } from '@app/styles/lists/tw' export interface WebsiteListProps { data?: any[] error?: any loading?: boolean mutatationLoading?: boolean lighthouseVisible?: boolean activeCrawls?: Record emptyHeaderTitle?: string emptyHeaderSubTitle?: string removePress(x: any): Promise refetch(_: any): Promise crawlWebsite(x: any): Promise setModal(x: any): void } interface WebsiteDashboardProps extends WebsiteListProps { handleClickOpen(data: any, title: any, url: any, error: any): void } // Iterate over website dashboard cells export const WebSitesDashboardComponent: FC< PropsWithChildren > = ({ data, removePress, handleClickOpen, crawlWebsite, lighthouseVisible, activeCrawls, children, }) => { if (!data?.length) { return (
No websites exist
) } return (
    {data?.map((props: Website, index: number) => ( ))} {children}
) } export const WebSitesDashboard = memo(WebSitesDashboardComponent)