Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: information display on the application review page #518

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const StepCategory = ({ title, progress }: IStepCategoryProps): JSX.Element => (
<Image alt="circle-check-blue" height="22" src="/circle-check-blue.svg" width="22" />
)}

{progress === EStepState.DONE && (
{progress >= EStepState.DONE && (
<Image alt="circle-check-blue-filled" height="22" src="/circle-check-blue-filled.svg" width="22" />
)}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -22,7 +23,7 @@ const ValueField = ({ title, body = undefined, required = false }: IValueFieldPr
<div className="flex flex-col gap-2 text-xs sm:text-sm">
<b className={clsx(required && "after:text-blue-400 after:content-['*']")}>{title}</b>

<div className="text-light flex flex-wrap gap-2 text-gray-400">
<div className="text-light flex flex-wrap gap-2 break-all text-gray-400">
{body === undefined && emptyPlaceholder}

{Array.isArray(body) && body.length === 0 && emptyPlaceholder}
Expand Down Expand Up @@ -101,7 +102,9 @@ export const ReviewApplicationDetails = (): JSX.Element => {
required
body={application.impactCategory?.map((tag) => (
<Tag key={tag} selected size="sm">
{tag}
{Object.keys(impactCategories).includes(tag) && (
<span>{impactCategories[tag as keyof typeof impactCategories].label}</span>
)}
</Tag>
))}
title="Impact categories"
Expand Down
Loading