From e5203b949f42c62487035b77ca958c38bf06dd66 Mon Sep 17 00:00:00 2001 From: Andrew Pazniak <594548+me-andre@users.noreply.github.com> Date: Tue, 23 Jan 2024 21:23:26 +0800 Subject: [PATCH] Fixed URL in Join/Apply link in Whiteboard Footer (#5426) --- .../WhiteboardDialog/WhiteboardDialogFooter.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/domain/collaboration/whiteboard/WhiteboardDialog/WhiteboardDialogFooter.tsx b/src/domain/collaboration/whiteboard/WhiteboardDialog/WhiteboardDialogFooter.tsx index 84e518d76c..808a129902 100644 --- a/src/domain/collaboration/whiteboard/WhiteboardDialog/WhiteboardDialogFooter.tsx +++ b/src/domain/collaboration/whiteboard/WhiteboardDialog/WhiteboardDialogFooter.tsx @@ -78,7 +78,18 @@ const WhiteboardDialogFooter = ({ ...spaceContext, }); - const journeyProfile = opportunityContext.profile ?? challengeContext.profile ?? spaceContext.profile; + const getJourneyProfile = () => { + switch (journeyTypeName) { + case 'space': + return spaceContext.profile; + case 'challenge': + return challengeContext.profile; + case 'opportunity': + return opportunityContext.profile; + } + }; + + const journeyProfile = getJourneyProfile(); const readonlyReason = canUpdateContent ? null