From 2f94cefa365727fe4e06a0a0a54205ce32b5c014 Mon Sep 17 00:00:00 2001 From: Crisgarner <@crisgarner> Date: Thu, 9 Jan 2025 13:43:48 -0600 Subject: [PATCH] feat(application-review): added card and updated review page --- .../components/ApplicationItem.tsx | 8 +++-- .../components/ReviewApplicationDetails.tsx | 32 +++++++++++++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/packages/interface/src/features/applications/components/ApplicationItem.tsx b/packages/interface/src/features/applications/components/ApplicationItem.tsx index 8614edd5..96f61bf9 100644 --- a/packages/interface/src/features/applications/components/ApplicationItem.tsx +++ b/packages/interface/src/features/applications/components/ApplicationItem.tsx @@ -32,7 +32,11 @@ export const ApplicationItem = ({ const form = useFormContext(); - const { fundingSources = [], profileImageUrl } = metadata.data ?? {}; + const { profileImageUrl } = metadata.data ?? {}; + const bio = + metadata.data?.bio && metadata.data.bio.length > 140 + ? `${metadata.data.bio.substring(0, 140)}...` + : metadata.data?.bio; useEffect(() => { if (isApproved) { @@ -60,7 +64,7 @@ export const ApplicationItem = ({
-
{fundingSources.length} funding sources
+
{bio}
diff --git a/packages/interface/src/features/applications/components/ReviewApplicationDetails.tsx b/packages/interface/src/features/applications/components/ReviewApplicationDetails.tsx index d7977eaa..e9cd4c47 100644 --- a/packages/interface/src/features/applications/components/ReviewApplicationDetails.tsx +++ b/packages/interface/src/features/applications/components/ReviewApplicationDetails.tsx @@ -3,8 +3,12 @@ import { useMemo, type ReactNode } from "react"; import { useFormContext } from "react-hook-form"; import { Heading } from "~/components/ui/Heading"; +import { Skeleton } from "~/components/ui/Skeleton"; import { Tag } from "~/components/ui/Tag"; import { impactCategories } from "~/config"; +import { ImpactCategories } from "~/features/projects/components/ImpactCategories"; +import { ProjectAvatar } from "~/features/projects/components/ProjectAvatar"; +import { ProjectBanner } from "~/features/projects/components/ProjectBanner"; import type { Application } from "../types"; @@ -122,6 +126,34 @@ export const ReviewApplicationDetails = (): JSX.Element => { title="Funding sources" /> + + Project Preview Card + +

This is how your project will look in the dashboard:

+ +
+
+
+ + + +
+ +
+ + {application.name} + + +
+ {application.bio} +
+ + + + +
+
+
); };