@mytec: iter10 ready for testing
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { memo } from 'react';
|
||||
import type { CoveragePoint } from '@/types/index.ts';
|
||||
|
||||
interface CoverageStatsProps {
|
||||
@@ -32,16 +33,22 @@ function classifyPoints(points: CoveragePoint[]) {
|
||||
return counts;
|
||||
}
|
||||
|
||||
export default function CoverageStats({ points, resolution }: CoverageStatsProps) {
|
||||
export default memo(function CoverageStats({ points, resolution }: CoverageStatsProps) {
|
||||
if (points.length === 0) {
|
||||
return (
|
||||
<div className="bg-white dark:bg-dark-surface border border-gray-200 dark:border-dark-border rounded-lg shadow-sm p-4">
|
||||
<h3 className="text-sm font-semibold text-gray-800 dark:text-dark-text mb-2">
|
||||
Coverage Analysis
|
||||
</h3>
|
||||
<p className="text-xs text-gray-400 dark:text-dark-muted">
|
||||
No coverage data. Calculate coverage first.
|
||||
</p>
|
||||
<div className="text-center py-3">
|
||||
<div className="text-2xl mb-1 opacity-40">📊</div>
|
||||
<p className="text-xs text-gray-400 dark:text-dark-muted">
|
||||
No coverage data yet.
|
||||
</p>
|
||||
<p className="text-xs text-gray-400 dark:text-dark-muted mt-0.5">
|
||||
Press <kbd className="px-1 py-0.5 bg-gray-100 dark:bg-dark-border rounded text-[10px] font-mono">Ctrl+Enter</kbd> to calculate.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -135,4 +142,4 @@ export default function CoverageStats({ points, resolution }: CoverageStatsProps
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user