From 72438af459cd917a96c3bd0b5f794736f49dd23e Mon Sep 17 00:00:00 2001 From: Arik Chakma Date: Wed, 14 Jun 2023 08:57:54 +0600 Subject: [PATCH] chore: roadmap selection --- src/components/RoadCard/RoadmapSelect.tsx | 1 + src/helper/get-badge-link.ts | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/RoadCard/RoadmapSelect.tsx b/src/components/RoadCard/RoadmapSelect.tsx index 838564c13..3b6359d2e 100644 --- a/src/components/RoadCard/RoadmapSelect.tsx +++ b/src/components/RoadCard/RoadmapSelect.tsx @@ -70,6 +70,7 @@ export function RoadmapSelect({ options={options} onChange={onChange} value={selectedRoadmaps} + placeholder="Select roadmaps" unstyled styles={{ input: (base) => ({ diff --git a/src/helper/get-badge-link.ts b/src/helper/get-badge-link.ts index 9237c3bc8..93bfac050 100644 --- a/src/helper/get-badge-link.ts +++ b/src/helper/get-badge-link.ts @@ -20,8 +20,7 @@ export function getBadgeLink({ if (variant) { badgeUrl.searchParams.set('variant', variant); } - const isRoadmapArray = roadmaps && Array.isArray(roadmaps) && roadmaps.length; - if (isRoadmapArray) { + if (roadmaps?.length) { badgeUrl.searchParams.set( 'roadmaps', roadmaps.map(({ value }) => value).join(',')