From 4029d4ae2a6f3a0e3201a51161eb1f5745394a85 Mon Sep 17 00:00:00 2001 From: sjaanus Date: Tue, 29 Jul 2025 17:26:06 +0300 Subject: [PATCH] Fix --- .../CreationArchiveChart/CreationArchiveChart.tsx | 2 +- .../CreationArchiveChart/CreationArchiveRatioTooltip.tsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/component/insights/componentsChart/CreationArchiveChart/CreationArchiveChart.tsx b/frontend/src/component/insights/componentsChart/CreationArchiveChart/CreationArchiveChart.tsx index 4fdd1c8fa8..91f6fee531 100644 --- a/frontend/src/component/insights/componentsChart/CreationArchiveChart/CreationArchiveChart.tsx +++ b/frontend/src/component/insights/componentsChart/CreationArchiveChart/CreationArchiveChart.tsx @@ -47,7 +47,7 @@ interface ICreationArchiveChartProps { isLoading?: boolean; } -type WeekData = { +export type WeekData = { archivedFlags: number; totalCreatedFlags: number; createdFlagsByType: Record; diff --git a/frontend/src/component/insights/componentsChart/CreationArchiveChart/CreationArchiveRatioTooltip.tsx b/frontend/src/component/insights/componentsChart/CreationArchiveChart/CreationArchiveRatioTooltip.tsx index c817a995a3..9b31e2d4a5 100644 --- a/frontend/src/component/insights/componentsChart/CreationArchiveChart/CreationArchiveRatioTooltip.tsx +++ b/frontend/src/component/insights/componentsChart/CreationArchiveChart/CreationArchiveRatioTooltip.tsx @@ -2,7 +2,8 @@ import type { FC } from 'react'; import { Box, Paper, Typography, styled, useTheme } from '@mui/material'; import type { TooltipState } from 'component/insights/components/LineChart/ChartTooltip/ChartTooltip'; import { ChartTooltipContainer } from 'component/insights/components/LineChart/ChartTooltip/ChartTooltip'; - +import type { Theme } from '@mui/material/styles/createTheme'; +import type { WeekData } from './CreationArchiveChart.tsx'; const getRatioTooltipColors = (theme: Theme) => ({ CREATED: theme.palette.success.main, ARCHIVED: theme.palette.background.application, @@ -42,7 +43,7 @@ export const CreationArchiveRatioTooltip: FC< return null; } - const rawData = ratioDataPoint.raw as RatioDataPointRaw; + const rawData = ratioDataPoint.raw as WeekData; if (!rawData) { return null;