web: added interval minute, profile list and profile view

This commit is contained in:
Carl-Gerhard Lindesvärd
2023-11-01 20:36:19 +01:00
parent 5a4765526b
commit 09672b34a3
19 changed files with 394 additions and 136 deletions

View File

@@ -1,6 +1,7 @@
import { useFormatDateInterval } from "@/hooks/useFormatDateInterval";
import { useMappings } from "@/hooks/useMappings";
import { useSelector } from "@/redux";
import { type IToolTipProps } from "@/types";
import { formatDate } from "@/utils/date";
type ReportLineChartTooltipProps = IToolTipProps<{
color: string;
@@ -17,6 +18,8 @@ export function ReportLineChartTooltip({
payload,
}: ReportLineChartTooltipProps) {
const getLabel = useMappings();
const interval = useSelector((state) => state.report.interval);
const formatDate = useFormatDateInterval(interval);
if (!active || !payload) {
return null;