From 044df81b7a8e2e5d7f037d76512ec0d62418f91b Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Mon, 2 Oct 2023 17:03:20 +0100 Subject: [PATCH] Creator details on roadmap page --- .../CustomRoadmap/CustomRoadmap.tsx | 1 + .../CustomRoadmap/RoadmapHeader.tsx | 30 +++++++++++++++---- .../CustomRoadmap/SkeletonRoadmapHeader.tsx | 4 +-- 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/src/components/CustomRoadmap/CustomRoadmap.tsx b/src/components/CustomRoadmap/CustomRoadmap.tsx index 06be83417..200b48a7b 100644 --- a/src/components/CustomRoadmap/CustomRoadmap.tsx +++ b/src/components/CustomRoadmap/CustomRoadmap.tsx @@ -49,6 +49,7 @@ export type CreatorType = { export type GetRoadmapResponse = RoadmapDocument & { canManage: boolean; creator?: CreatorType; + team?: CreatorType; }; export function hideRoadmapLoader() { diff --git a/src/components/CustomRoadmap/RoadmapHeader.tsx b/src/components/CustomRoadmap/RoadmapHeader.tsx index 6a8d1243f..03ac2fc36 100644 --- a/src/components/CustomRoadmap/RoadmapHeader.tsx +++ b/src/components/CustomRoadmap/RoadmapHeader.tsx @@ -20,6 +20,7 @@ export function RoadmapHeader(props: RoadmapHeaderProps) { description, _id: roadmapId, creator, + team, } = useStore(currentRoadmap) || {}; const [isSharing, setIsSharing] = useState(false); @@ -66,12 +67,29 @@ export function RoadmapHeader(props: RoadmapHeaderProps) { return (
-
- -

- {creator?.name || 'Anonymous'} -

-
+ {creator?.name && ( +
+ {creator.name} + + Created by  + + {creator?.name} + + {team && ( + <> +  in  + + {team?.name} + + + )} + +
+ )}

{title}

diff --git a/src/components/CustomRoadmap/SkeletonRoadmapHeader.tsx b/src/components/CustomRoadmap/SkeletonRoadmapHeader.tsx index 2879e9f9f..594f16ac7 100644 --- a/src/components/CustomRoadmap/SkeletonRoadmapHeader.tsx +++ b/src/components/CustomRoadmap/SkeletonRoadmapHeader.tsx @@ -3,8 +3,8 @@ export function SkeletonRoadmapHeader() {

-
-
+
+