From 3949626003bb31c791e0ef99a8169876fa35c425 Mon Sep 17 00:00:00 2001 From: Jennifer Echenim Date: Wed, 3 Jul 2024 19:08:09 +0400 Subject: [PATCH] fix: failing build --- .../components/modules/dashboard/analytics-card.tsx | 8 ++------ .../src/components/modules/dashboard/index.tsx | 10 ++-------- tools/tenscan/frontend/src/types/interfaces/index.ts | 7 +++++++ 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/tools/tenscan/frontend/src/components/modules/dashboard/analytics-card.tsx b/tools/tenscan/frontend/src/components/modules/dashboard/analytics-card.tsx index 348a1cf52a..2caec11f59 100644 --- a/tools/tenscan/frontend/src/components/modules/dashboard/analytics-card.tsx +++ b/tools/tenscan/frontend/src/components/modules/dashboard/analytics-card.tsx @@ -5,17 +5,13 @@ import { CardContent, } from "@/src/components/ui/card"; import { Skeleton } from "@/src/components/ui/skeleton"; +import { DashboardAnalyticsData } from "@/src/types/interfaces"; import React from "react"; export default function AnalyticsCard({ item, }: { - item: { - title: string; - value: string | number | JSX.Element; - change?: string; - icon: any; - }; + item: DashboardAnalyticsData; }) { return ( diff --git a/tools/tenscan/frontend/src/components/modules/dashboard/index.tsx b/tools/tenscan/frontend/src/components/modules/dashboard/index.tsx index 8a63746b3d..f2ec71e079 100644 --- a/tools/tenscan/frontend/src/components/modules/dashboard/index.tsx +++ b/tools/tenscan/frontend/src/components/modules/dashboard/index.tsx @@ -28,13 +28,7 @@ import { Badge } from "../../ui/badge"; import { BlocksIcon } from "lucide-react"; import { useRollupsService } from "@/src/services/useRollupsService"; import { RecentRollups } from "./recent-rollups"; - -interface DashboardData { - title: string; - value: string | number | JSX.Element; - icon: JSX.Element; - change?: string; -} +import { DashboardAnalyticsData } from "@/src/types/interfaces"; interface RecentData { title: string; @@ -137,7 +131,7 @@ export default function Dashboard() {

Tenscan

- {DASHBOARD_DATA.map((item: DashboardData, index) => ( + {DASHBOARD_DATA.map((item: DashboardAnalyticsData, index: number) => ( ))}
diff --git a/tools/tenscan/frontend/src/types/interfaces/index.ts b/tools/tenscan/frontend/src/types/interfaces/index.ts index b592e7a5b1..3510b2edb0 100644 --- a/tools/tenscan/frontend/src/types/interfaces/index.ts +++ b/tools/tenscan/frontend/src/types/interfaces/index.ts @@ -87,3 +87,10 @@ export enum BadgeType { DEFAULT = "default", OUTLINE = "outline", } + +export interface DashboardAnalyticsData { + title: string; + value: string | number | JSX.Element; + change?: string; + icon: any; +}