feat: update showcase status

feat/featured
Arik Chakma 6 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 ( return (
<> <>
<div className="relative border-b"> <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"> <div className="container relative mt-6 py-5 sm:py-12">
{!$canManageCurrentRoadmap && <CustomRoadmapAlert />} {!$canManageCurrentRoadmap && <CustomRoadmapAlert />}

@ -20,10 +20,7 @@ export function SubmitShowcaseWarning(props: SubmitShowcaseWarningProps) {
const submit = useMutation( const submit = useMutation(
{ {
mutationFn: async () => { mutationFn: async () => {
return httpPost( return httpPost(`/v1-submit-for-showcase/${$currentRoadmap?._id}`, {});
`/v1-submit-for-featured-listing/${$currentRoadmap?._id}`,
{},
);
}, },
onSuccess: () => { onSuccess: () => {
queryClient.invalidateQueries({ queryClient.invalidateQueries({
@ -40,7 +37,7 @@ export function SubmitShowcaseWarning(props: SubmitShowcaseWarningProps) {
); );
const { const {
showcaseStatus = 'idle', showcaseStatus,
showcaseRejectedReason, showcaseRejectedReason,
showcaseRejectedAt, showcaseRejectedAt,
updatedAt, updatedAt,
@ -56,7 +53,7 @@ export function SubmitShowcaseWarning(props: SubmitShowcaseWarningProps) {
</h2> </h2>
<p className="mt-2 text-sm"> <p className="mt-2 text-sm">
{showcaseStatus === 'rejected_with_reason' && showcaseRejectedReason} {showcaseStatus === 'rejected_with_reason' && showcaseRejectedReason}
{showcaseStatus === 'idle' && ( {!showcaseStatus && (
<> <>
Submitting your roadmap for a featured listing will make it Submitting your roadmap for a featured listing will make it
visible to everyone on the platform.{' '} visible to everyone on the platform.{' '}

Loading…
Cancel
Save