From d4b6e1788b780c84cf11423376302150deacfb95 Mon Sep 17 00:00:00 2001 From: onehanddev Date: Thu, 14 Nov 2024 17:28:19 +0530 Subject: [PATCH] Fixed import and types --- client/src/app/my-projects/page.tsx | 6 +++--- client/src/containers/my-projects/types.ts | 15 ++++----------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/client/src/app/my-projects/page.tsx b/client/src/app/my-projects/page.tsx index 21d00e5c..827088f5 100644 --- a/client/src/app/my-projects/page.tsx +++ b/client/src/app/my-projects/page.tsx @@ -1,8 +1,8 @@ -import MyProjectsView from "../../containers/my-projects"; -import { CustomProject } from "../../containers/my-projects/types"; +import MyProjectsView from "@/containers/my-projects"; +import { CustomProject } from "@/containers/my-projects/types"; const MOCK_DATA: CustomProject[] = Array.from({ length: 15 }, (_, i) => ({ - id: i + 1, + id: String(i + 1), projectName: "My custom project", location: "Location", totalNPVCost: Math.floor(1000000 + Math.random() * 9000000), diff --git a/client/src/containers/my-projects/types.ts b/client/src/containers/my-projects/types.ts index 9bf6b0f7..18540211 100644 --- a/client/src/containers/my-projects/types.ts +++ b/client/src/containers/my-projects/types.ts @@ -1,16 +1,9 @@ +import { ProjectType } from "@shared/contracts/projects.contract"; import { ColumnDef } from "@tanstack/react-table"; -type ProjectType = "Conservation" | "Restoration"; //todo: make this dynamic - -export interface CustomProject { - id: number; - projectName: string; - location: string; - totalNPVCost: number; - abatementPotential: number; - type: ProjectType; - className?: string; -} +export type CustomProject = Partial & { + type: string; +}; export type CustomColumn = ColumnDef & { className?: string;