chore: roadmap selection

pull/4053/head
Arik Chakma 1 year ago
parent 5282bef453
commit 72438af459
  1. 1
      src/components/RoadCard/RoadmapSelect.tsx
  2. 3
      src/helper/get-badge-link.ts

@ -70,6 +70,7 @@ export function RoadmapSelect({
options={options} options={options}
onChange={onChange} onChange={onChange}
value={selectedRoadmaps} value={selectedRoadmaps}
placeholder="Select roadmaps"
unstyled unstyled
styles={{ styles={{
input: (base) => ({ input: (base) => ({

@ -20,8 +20,7 @@ export function getBadgeLink({
if (variant) { if (variant) {
badgeUrl.searchParams.set('variant', variant); badgeUrl.searchParams.set('variant', variant);
} }
const isRoadmapArray = roadmaps && Array.isArray(roadmaps) && roadmaps.length; if (roadmaps?.length) {
if (isRoadmapArray) {
badgeUrl.searchParams.set( badgeUrl.searchParams.set(
'roadmaps', 'roadmaps',
roadmaps.map(({ value }) => value).join(',') roadmaps.map(({ value }) => value).join(',')

Loading…
Cancel
Save