remove duplicated time util

This commit is contained in:
Alex Holliday committed 2026-04-29 11:15:33 -07:00
1 parent 1398ab6721
commit e85e9dc2d4
3 files changed
+18 -16

No files matched your search

@@ -5,8 +5,10 @@ import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
import type { SxProps, Theme } from "@mui/material/styles";
import { useTranslation } from "react-i18next";
import { useSelector } from "react-redux";
import type { RootState } from "@/store";
import type { CheckSnapshot } from "@/Types/Check";
import { formatCheckTimestamp } from "./timeFormat";
import { formatDateWithTz } from "@/Utils/TimeUtils";
const CELLS = 25;
const MIN_HEIGHT_PCT = 6;
@@ -32,6 +34,7 @@ export const ThemedHistogram = ({
statsGap = 1,
}: Props) => {
const { t } = useTranslation();
const uiTimezone = useSelector((state: RootState) => state.ui.timezone);
const { padded, max, avg, peak } = useMemo(() => {
const source = checks.slice(0, CELLS).reverse();
@@ -77,7 +80,11 @@ export const ThemedHistogram = ({
variant="caption"
sx={{ opacity: 0.8 }}
>
{formatCheckTimestamp(check.createdAt)}
{formatDateWithTz(
check.createdAt,
"ddd, MMMM D, YYYY, HH:mm A",
uiTimezone
)}
</Typography>
</Stack>
);