From fca41dc9696a0758f6a12a47ead8469b3e437bd5 Mon Sep 17 00:00:00 2001 From: Arik Chakma Date: Wed, 20 Nov 2024 07:36:28 +0600 Subject: [PATCH] feat: update showcase status --- src/components/CustomRoadmap/RoadmapHeader.tsx | 4 +++- .../CustomRoadmap/Showcase/SubmitShowcaseWarning.tsx | 9 +++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/components/CustomRoadmap/RoadmapHeader.tsx b/src/components/CustomRoadmap/RoadmapHeader.tsx index 5a77b1c9e..5baca89dd 100644 --- a/src/components/CustomRoadmap/RoadmapHeader.tsx +++ b/src/components/CustomRoadmap/RoadmapHeader.tsx @@ -77,7 +77,9 @@ export function RoadmapHeader(props: RoadmapHeaderProps) { return ( <>
- {$currentRoadmap && } + {$currentRoadmap && $canManageCurrentRoadmap && ( + + )}
{!$canManageCurrentRoadmap && } diff --git a/src/components/CustomRoadmap/Showcase/SubmitShowcaseWarning.tsx b/src/components/CustomRoadmap/Showcase/SubmitShowcaseWarning.tsx index 4a35dadbc..c5cecc795 100644 --- a/src/components/CustomRoadmap/Showcase/SubmitShowcaseWarning.tsx +++ b/src/components/CustomRoadmap/Showcase/SubmitShowcaseWarning.tsx @@ -20,10 +20,7 @@ export function SubmitShowcaseWarning(props: SubmitShowcaseWarningProps) { const submit = useMutation( { mutationFn: async () => { - return httpPost( - `/v1-submit-for-featured-listing/${$currentRoadmap?._id}`, - {}, - ); + return httpPost(`/v1-submit-for-showcase/${$currentRoadmap?._id}`, {}); }, onSuccess: () => { queryClient.invalidateQueries({ @@ -40,7 +37,7 @@ export function SubmitShowcaseWarning(props: SubmitShowcaseWarningProps) { ); const { - showcaseStatus = 'idle', + showcaseStatus, showcaseRejectedReason, showcaseRejectedAt, updatedAt, @@ -56,7 +53,7 @@ export function SubmitShowcaseWarning(props: SubmitShowcaseWarningProps) {

{showcaseStatus === 'rejected_with_reason' && showcaseRejectedReason} - {showcaseStatus === 'idle' && ( + {!showcaseStatus && ( <> Submitting your roadmap for a featured listing will make it visible to everyone on the platform.{' '}