diff --git a/client/src/containers/projects/custom-project/header/parameters/index.tsx b/client/src/containers/projects/custom-project/header/parameters/index.tsx index 2f3b7c31..c20979ba 100644 --- a/client/src/containers/projects/custom-project/header/parameters/index.tsx +++ b/client/src/containers/projects/custom-project/header/parameters/index.tsx @@ -1,3 +1,4 @@ +import { CUSTOM_PROJECT_PRICE_TYPE } from "@shared/dtos/custom-projects/custom-projects.enums"; import { COST_TYPE_SELECTOR } from "@shared/entities/projects.entity"; import { z } from "zod"; @@ -5,7 +6,6 @@ import { FILTER_KEYS } from "@/app/(overview)/constants"; import { INITIAL_COST_RANGE } from "@/containers/overview/filters/constants"; import { - CUSTOM_PROJECT_PRICE_TYPE, filtersSchema, useCustomProjectFilters, } from "@/containers/projects/url-store"; diff --git a/client/src/containers/projects/url-store.ts b/client/src/containers/projects/url-store.ts index a9bcb341..140be67f 100644 --- a/client/src/containers/projects/url-store.ts +++ b/client/src/containers/projects/url-store.ts @@ -1,14 +1,10 @@ +import { CUSTOM_PROJECT_PRICE_TYPE } from "@shared/dtos/custom-projects/custom-projects.enums"; import { COST_TYPE_SELECTOR } from "@shared/entities/projects.entity"; import { parseAsJson, useQueryState } from "nuqs"; import { z } from "zod"; import { FILTER_KEYS } from "@/app/(overview)/constants"; -export enum CUSTOM_PROJECT_PRICE_TYPE { - INITIAL_CARBON_PRICE_ASSUMPTION = "Initial carbon price assumption", - BREAKEVEN_PRICE = "Breakeven price", -} - export const filtersSchema = z.object({ [FILTER_KEYS[2]]: z.nativeEnum(CUSTOM_PROJECT_PRICE_TYPE), [FILTER_KEYS[3]]: z.nativeEnum(COST_TYPE_SELECTOR), diff --git a/client/src/hooks/use-custom-project-output.ts b/client/src/hooks/use-custom-project-output.ts index e54db6bf..83178404 100644 --- a/client/src/hooks/use-custom-project-output.ts +++ b/client/src/hooks/use-custom-project-output.ts @@ -1,5 +1,6 @@ import { useMemo } from "react"; +import { CUSTOM_PROJECT_PRICE_TYPE } from "@shared/dtos/custom-projects/custom-projects.enums"; import { CustomProject } from "@shared/entities/custom-project.entity"; import { useAtomValue } from "jotai"; @@ -14,7 +15,6 @@ import { } from "@/containers/projects/custom-project/annual-project-cash-flow/utils"; import { parseCostDetailsForTable } from "@/containers/projects/custom-project/cost-details/table/utils"; import { useCustomProjectFilters } from "@/containers/projects/url-store"; -import { CUSTOM_PROJECT_PRICE_TYPE } from "@/containers/projects/url-store"; export const useCustomProjectOutput = ( data: InstanceType, diff --git a/shared/dtos/custom-projects/custom-projects.enums.ts b/shared/dtos/custom-projects/custom-projects.enums.ts new file mode 100644 index 00000000..e454c664 --- /dev/null +++ b/shared/dtos/custom-projects/custom-projects.enums.ts @@ -0,0 +1,4 @@ +export enum CUSTOM_PROJECT_PRICE_TYPE { + INITIAL_CARBON_PRICE_ASSUMPTION = "Initial carbon price assumption", + BREAKEVEN_PRICE = "Breakeven price", +}