From 605bf45414e6ebbc4cdd921e87ad5d8309225c35 Mon Sep 17 00:00:00 2001 From: yu-zhen Date: Thu, 5 Dec 2024 02:53:36 +0900 Subject: [PATCH] fix: information display on the application review page --- .../features/applications/components/ApplicationSteps.tsx | 2 +- .../applications/components/ReviewApplicationDetails.tsx | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/interface/src/features/applications/components/ApplicationSteps.tsx b/packages/interface/src/features/applications/components/ApplicationSteps.tsx index b86cfaf3..62a9aa1f 100644 --- a/packages/interface/src/features/applications/components/ApplicationSteps.tsx +++ b/packages/interface/src/features/applications/components/ApplicationSteps.tsx @@ -22,7 +22,7 @@ const StepCategory = ({ title, progress }: IStepCategoryProps): JSX.Element => ( circle-check-blue )} - {progress === EStepState.DONE && ( + {progress >= EStepState.DONE && ( circle-check-blue-filled )} diff --git a/packages/interface/src/features/applications/components/ReviewApplicationDetails.tsx b/packages/interface/src/features/applications/components/ReviewApplicationDetails.tsx index c0fb1d05..d7977eaa 100644 --- a/packages/interface/src/features/applications/components/ReviewApplicationDetails.tsx +++ b/packages/interface/src/features/applications/components/ReviewApplicationDetails.tsx @@ -4,6 +4,7 @@ import { useFormContext } from "react-hook-form"; import { Heading } from "~/components/ui/Heading"; import { Tag } from "~/components/ui/Tag"; +import { impactCategories } from "~/config"; import type { Application } from "../types"; @@ -22,7 +23,7 @@ const ValueField = ({ title, body = undefined, required = false }: IValueFieldPr
{title} -
+
{body === undefined && emptyPlaceholder} {Array.isArray(body) && body.length === 0 && emptyPlaceholder} @@ -101,7 +102,9 @@ export const ReviewApplicationDetails = (): JSX.Element => { required body={application.impactCategory?.map((tag) => ( - {tag} + {Object.keys(impactCategories).includes(tag) && ( + {impactCategories[tag as keyof typeof impactCategories].label} + )} ))} title="Impact categories"