feat: update showcase status

feat/featured
Arik Chakma 2 days ago
parent 2f0ac303a0
commit fca41dc969
  1. 4
      src/components/CustomRoadmap/RoadmapHeader.tsx
  2. 9
      src/components/CustomRoadmap/Showcase/SubmitShowcaseWarning.tsx

@ -77,7 +77,9 @@ export function RoadmapHeader(props: RoadmapHeaderProps) {
return (
<>
<div className="relative border-b">
{$currentRoadmap && <ShowcaseAlert currentRoadmap={$currentRoadmap} />}
{$currentRoadmap && $canManageCurrentRoadmap && (
<ShowcaseAlert currentRoadmap={$currentRoadmap} />
)}
<div className="container relative mt-6 py-5 sm:py-12">
{!$canManageCurrentRoadmap && <CustomRoadmapAlert />}

@ -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) {
</h2>
<p className="mt-2 text-sm">
{showcaseStatus === 'rejected_with_reason' && showcaseRejectedReason}
{showcaseStatus === 'idle' && (
{!showcaseStatus && (
<>
Submitting your roadmap for a featured listing will make it
visible to everyone on the platform.{' '}

Loading…
Cancel
Save