From 2f0ac303a076da95f5d8eb27e56c604c6e46897b Mon Sep 17 00:00:00 2001 From: Arik Chakma Date: Wed, 20 Nov 2024 06:38:12 +0600 Subject: [PATCH] wip: showcase listing --- .../CreateRoadmap/CreateRoadmapModal.tsx | 1 - src/components/CustomRoadmap/RoadmapHeader.tsx | 9 ++++----- .../CustomRoadmap/Showcase/ShowcaseAlert.tsx | 12 +++++++++--- .../CustomRoadmap/Showcase/ShowcaseStatus.tsx | 6 +++--- .../CustomRoadmap/SkeletonRoadmapHeader.tsx | 8 ++++---- 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/components/CustomRoadmap/CreateRoadmap/CreateRoadmapModal.tsx b/src/components/CustomRoadmap/CreateRoadmap/CreateRoadmapModal.tsx index ca47570d8..3b6672289 100644 --- a/src/components/CustomRoadmap/CreateRoadmap/CreateRoadmapModal.tsx +++ b/src/components/CustomRoadmap/CreateRoadmap/CreateRoadmapModal.tsx @@ -24,7 +24,6 @@ export type AllowedCustomRoadmapType = (typeof allowedCustomRoadmapType)[number]; export const allowedShowcaseStatus = [ - 'idle', 'submitted', 'approved', 'rejected', diff --git a/src/components/CustomRoadmap/RoadmapHeader.tsx b/src/components/CustomRoadmap/RoadmapHeader.tsx index 9ac525571..5a77b1c9e 100644 --- a/src/components/CustomRoadmap/RoadmapHeader.tsx +++ b/src/components/CustomRoadmap/RoadmapHeader.tsx @@ -76,10 +76,10 @@ export function RoadmapHeader(props: RoadmapHeaderProps) { return ( <> - {$currentRoadmap && } +
+ {$currentRoadmap && } -
-
+
{!$canManageCurrentRoadmap && } {creator?.name && ( @@ -181,8 +181,7 @@ export function RoadmapHeader(props: RoadmapHeaderProps) { )} - {((ratings?.average || 0) > 0 || - showcaseStatus === 'approved') && ( + {showcaseStatus === 'approved' && ( @@ -67,6 +72,7 @@ export function ShowcaseAlert(props: ShowcaseAlertProps) {
{ setShowSubmitWarning(true); }} - disabled={showcaseStatus !== 'idle'} + disabled={!!showcaseStatus} > Submit for Showcase diff --git a/src/components/CustomRoadmap/SkeletonRoadmapHeader.tsx b/src/components/CustomRoadmap/SkeletonRoadmapHeader.tsx index e0d9bd14d..9759918d4 100644 --- a/src/components/CustomRoadmap/SkeletonRoadmapHeader.tsx +++ b/src/components/CustomRoadmap/SkeletonRoadmapHeader.tsx @@ -1,9 +1,9 @@ export function SkeletonRoadmapHeader() { return (
-
-
-
+
+
+
@@ -12,7 +12,7 @@ export function SkeletonRoadmapHeader() {
-
+