From 220481fff89e84f371e37007ed3a43cb0af276db Mon Sep 17 00:00:00 2001 From: Domingo Dirutigliano Date: Wed, 28 Aug 2024 00:01:56 +0200 Subject: [PATCH] fix: submitter frontend forms --- frontend/src/components/charts/LineChartAttackView.tsx | 8 +++----- frontend/src/components/charts/LineChartFlagView.tsx | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/frontend/src/components/charts/LineChartAttackView.tsx b/frontend/src/components/charts/LineChartAttackView.tsx index cfe6030..262bd73 100644 --- a/frontend/src/components/charts/LineChartAttackView.tsx +++ b/frontend/src/components/charts/LineChartAttackView.tsx @@ -2,7 +2,7 @@ import { hashedColor } from "@/utils" import { clientsQuery, exploitsQuery, statsQuery, statusQuery } from "@/utils/queries" import { getDateSmallFormatted } from "@/utils/time" import { AttackStatuses } from "@/utils/types" -import { AreaChart, ChartData, LineChart } from "@mantine/charts" +import { AreaChart, ChartData } from "@mantine/charts" import { Box, Divider, Space } from "@mantine/core" import { useMemo } from "react" import { AttackTypeControl, SeriesTypeChartControl, TypeLineChartControl } from "@/components/inputs/Controllers" @@ -78,20 +78,18 @@ export const LineChartAttackView = ({ seriesType, attackType, chartType, withCon return res?.filter((tick) => Object.keys(tick).length > 1)??[] }, [stats.isFetching, finalSeries, finalAttackStatus, finalChartType, exploits.isFetching]) - const ChartComponent = finalChartType == "area" ? AreaChart : LineChart - return Attacks chart - Object.keys(item).length > 1)??[] }, [stats.isFetching, finalSeries, finalFlagStatus, finalChartType, exploits.isFetching]) - const ChartComponent = finalChartType == "area" ? AreaChart : LineChart - return Flag chart -