fix: address PR feedback

This commit is contained in:
nikhil2004 committed 2026-09-22 03:33:27 +05:30
1 parent d5e887903e
commit de4c528d55
9 files changed
+95 -35

No files matched your search

@@ -5,7 +5,7 @@ import Stack from "@mui/material/Stack";
import type { SxProps, Theme } from "@mui/material/styles";
import { useTranslation } from "react-i18next";
import { formatMs } from "@/Utils/TimeUtils";
import { mergeSx } from "@/Utils/mergeSx";
import type {
BarKind,
ChartCell,
@@ -42,17 +42,17 @@ export const ThemedHistogram = ({
return (
<Stack gap={statsGap}>
<Box
sx={mergeSx(containerSx, { gridTemplateColumns: `repeat(${cells.length}, 1fr)` })}
sx={[containerSx, { gridTemplateColumns: `repeat(${cells.length}, 1fr)` }]}
>
{cells.map((cell) => {
if (cell.barKind === "empty") {
return (
<Box
key={cell.key}
sx={mergeSx(
sx={[
barSx("empty", cell.heightPct),
!!cell.date && !!onCellClick ? { cursor: "pointer" } : undefined
)}
]}
onClick={() => {
if (cell.date && onCellClick) {
onCellClick(cell.date);
@@ -69,10 +69,10 @@ export const ThemedHistogram = ({
placement="top"
>
<Box
sx={mergeSx(
sx={[
barSx(cell.barKind, cell.heightPct, cell.severity),
!!cell.date && !!onCellClick ? { cursor: "pointer" } : undefined
)}
]}
aria-label={cell.ariaLabel}
onClick={() => {
if (cell.date && onCellClick) {