import { classNames } from '@app/utils/classes' import Head from 'next/head' import { memo } from 'react' type CellHeaderProps = { url?: string setVisible(x: any): void visible?: boolean totalIssues?: number warningCount?: number errorCount?: number domain: string totalErrors: number } const ListCellAnalyticsHeaderW = ({ url = '', setVisible, visible, warningCount, errorCount, totalErrors, }: CellHeaderProps) => { const onTogglelist = () => setVisible((v: boolean) => !v) const errorPercentage = ( Math.ceil((((errorCount || 1) / (totalErrors || 1)) * 100) / 5) * 5 ).toFixed(0) const dynamicErrorClassName = `w-${errorPercentage}-after` const disabled = !warningCount && !errorCount // return a small single row of the page and issues with a dropdown return ( <> {totalErrors ? ( ) : null}
{warningCount}
{errorCount}
) } export const ListCellAnalyticsHeader = memo(ListCellAnalyticsHeaderW)