From 34083e869f160043d3650050f7575978fcbfb433 Mon Sep 17 00:00:00 2001 From: laixingyou Date: Fri, 24 Nov 2023 17:24:02 +0800 Subject: [PATCH] fix: clean old api (#269) Signed-off-by: laixingyou --- .../src/common/transform/transMetricToAxis.ts | 4 ++-- .../DataView/OverviewSummary/index.tsx | 1 - .../src/modules/analyze/MetricDetailPage.tsx | 21 ------------------- 3 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 apps/web/src/modules/analyze/MetricDetailPage.tsx diff --git a/apps/web/src/common/transform/transMetricToAxis.ts b/apps/web/src/common/transform/transMetricToAxis.ts index 872e9bf2..7c9d7440 100644 --- a/apps/web/src/common/transform/transMetricToAxis.ts +++ b/apps/web/src/common/transform/transMetricToAxis.ts @@ -1,7 +1,7 @@ import parseISO from 'date-fns/parseISO'; import getUnixTime from 'date-fns/getUnixTime'; import { Level } from '@modules/analyze/constant'; -import { MetricQuery, LabMetricQuery } from '@oss-compass/graphql'; +import { MetricQuery } from '@oss-compass/graphql'; import { toFixed } from '@common/utils'; import { TransOpt, TransResult } from '@modules/analyze/type'; import { CommunityRepoType } from '../constant'; @@ -9,7 +9,7 @@ import { CommunityRepoType } from '../constant'; interface DataItem { label: string; level: Level; - result: MetricQuery | LabMetricQuery | undefined; + result: MetricQuery | undefined; } function getDateMap( diff --git a/apps/web/src/modules/analyze/DataView/OverviewSummary/index.tsx b/apps/web/src/modules/analyze/DataView/OverviewSummary/index.tsx index a4bddd3a..1e23dfad 100644 --- a/apps/web/src/modules/analyze/DataView/OverviewSummary/index.tsx +++ b/apps/web/src/modules/analyze/DataView/OverviewSummary/index.tsx @@ -7,7 +7,6 @@ import useMetricQueryData from '@modules//analyze/hooks/useMetricQueryData'; import { withErrorBoundary } from 'react-error-boundary'; import ErrorFallback from '@common/components/ErrorFallback'; import { Level } from '@modules/analyze/constant'; -import MetricDashboard from '@modules/analyze/components/MetricDetail/MetricDashboard'; const Overview: React.FC<{ data: DeepReadonly< diff --git a/apps/web/src/modules/analyze/MetricDetailPage.tsx b/apps/web/src/modules/analyze/MetricDetailPage.tsx deleted file mode 100644 index b867dfde..00000000 --- a/apps/web/src/modules/analyze/MetricDetailPage.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; -import LegacyLabelRedirect from './components/Container/LegacyLabelRedirect'; -import AnalyzeContainer from './components/Container/AnalyzeContainer'; -import { Main } from '@common/components/Layout'; -import MetricDetailMore from './components/MetricDetail/MetricDetailMore'; -import Header from '@common/components/Header'; - -const Analyze = () => { - return ( - - -
-
- -
- - - ); -}; - -export default Analyze;