diff --git a/src/components/Learn/FeaturedTours.tsx b/src/components/Learn/FeaturedTours.tsx index febdb6c0f..e59197ff8 100644 --- a/src/components/Learn/FeaturedTours.tsx +++ b/src/components/Learn/FeaturedTours.tsx @@ -1,7 +1,6 @@ import { useQueryClient } from "@tanstack/react-query"; import { Link, useNavigate } from "@tanstack/react-router"; -import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Icon } from "@/components/ui/icon"; import { BlockStack, InlineStack } from "@/components/ui/layout"; @@ -11,26 +10,24 @@ import { resetAllTourPipelineState } from "@/providers/TourProvider/tourPipeline import { APP_ROUTES } from "@/routes/router"; import { tracking } from "@/utils/tracking"; +import { TourCompletedBadge } from "./TourCompletedBadge"; import { tours as tourCards } from "./tours"; -import { getTour } from "./tours/registry"; interface FeaturedTour { id: string; title: string; duration: string; - tag?: "new" | "popular"; - available: boolean; } -const FEATURED_TOUR_IDS: Array> = [ - { id: "navigating-the-editor", tag: "new" }, - { id: "first-pipeline", tag: "popular" }, - { id: "using-secrets" }, - { id: "multinode-tasks" }, +const FEATURED_TOUR_IDS: string[] = [ + "navigating-the-editor", + "first-pipeline", + "using-secrets", + "subgraphs", ]; function buildFeaturedTours(): FeaturedTour[] { - return FEATURED_TOUR_IDS.flatMap(({ id, tag }) => { + return FEATURED_TOUR_IDS.flatMap((id) => { const card = tourCards.find((c) => c.id === id); if (!card) return []; return [ @@ -38,8 +35,6 @@ function buildFeaturedTours(): FeaturedTour[] { id, title: card.title, duration: card.duration, - tag, - available: getTour(id) !== undefined, }, ]; }); @@ -106,7 +101,6 @@ function FeaturedTourButton({ - ) : ( - - )} + aria-hidden="true" + /> + @@ -107,10 +90,6 @@ function DifficultySection({ difficulty: TourDifficulty; tours: Tour[]; }) { - if (difficultyTours.length === 0) { - return null; - } - return ( @@ -150,7 +129,9 @@ export function ToursLibrary() { return ( - {TOUR_DIFFICULTY_ORDER.map((difficulty) => ( + {TOUR_DIFFICULTY_ORDER.filter( + (difficulty) => (buckets.get(difficulty)?.length ?? 0) > 0, + ).map((difficulty) => (