Skip to content

Commit

Permalink
fix: remove debug code
Browse files Browse the repository at this point in the history
  • Loading branch information
AKharytonchyk committed Apr 21, 2024
1 parent 8b04c13 commit cc089b6
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/components/CoverageCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,28 @@ export const CoverageCell: React.FC<{ coverage: number; previous: number }> = ({
coverage,
previous,
}) => {
const randomPrevios0to100 = Math.floor(Math.random() * 100);
const icon = React.useMemo(
() => CoverageDiffIcon(coverage - randomPrevios0to100, randomPrevios0to100),
[coverage, randomPrevios0to100]
() => CoverageDiffIcon(coverage - previous, previous),
[coverage, previous]
);

const styles = React.useMemo(() => RYGGradient(coverage), [coverage]);
return (
<TableCell sx={styles}>
<Box sx={{ display: "flex", justifyContent: "space-between", alignItems: "baseline", maxWidth: "4.5em" }}>
<Typography variant="body1">{Math.round(coverage)}%</Typography>
<Box
sx={{
display: "flex",
justifyContent: "space-between",
alignItems: "baseline",
maxWidth: "4.5em",
}}
>
<Typography
variant="body1"
sx={{ fontWeight: coverage < 50 ? "bolder" : "bold" }}
>
{Math.round(coverage)}%
</Typography>
{icon}
</Box>
</TableCell>
Expand Down

0 comments on commit cc089b6

Please sign in to comment.