import { memo } from 'react' import { CardHeader } from '@app/components/stateless/card/header' import { ListSkeleton } from '../../placeholders' import { Button } from '../buttons' import { UserManager } from '@app/managers' import { Cell } from '../cells/cell' import { Website } from '@app/types' const emptyClass = 'min-h-10' function WebSites({ data }: any) { return data?.map((props: Website) => ( )) } const onLogout = () => { UserManager.clearUser() window.location.href = '/' } // TODO: remove for central history component export function ListComponent({ data, error, loading, emptyHeaderTitle = 'Empty', emptyHeaderSubTitle = 'Add your website below', }: any) { if (!data?.length && loading) { return } if (!data.length && !loading && error) { return ( ) } if (data?.length) { return ( ) } return ( ) } export const List = memo(ListComponent)