fix(client): allow clicking empty cells to view historical incidents
This commit is contained in:
1 parent
be39ad0bfe
commit
97e23e4b3a
2 files changed
+18
-2
No files matched your search
@@ -31,7 +31,15 @@ export const ThemedHeatmap = ({ cells, containerSx, cellSx, onCellClick }: Props
|
|||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
key={cell.key}
|
key={cell.key}
|
||||||
sx={cellSx("empty")}
|
sx={[
|
||||||
|
cellSx("empty"),
|
||||||
|
!!cell.date && !!onCellClick && { cursor: "pointer" },
|
||||||
|
]}
|
||||||
|
onClick={() => {
|
||||||
|
if (cell.date && onCellClick) {
|
||||||
|
onCellClick(cell.date);
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,15 @@ export const ThemedHistogram = ({
|
|||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
key={cell.key}
|
key={cell.key}
|
||||||
sx={barSx("empty", cell.heightPct)}
|
sx={[
|
||||||
|
barSx("empty", cell.heightPct),
|
||||||
|
!!cell.date && !!onCellClick && { cursor: "pointer" },
|
||||||
|
]}
|
||||||
|
onClick={() => {
|
||||||
|
if (cell.date && onCellClick) {
|
||||||
|
onCellClick(cell.date);
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user