"use client"; import { useState } from "react"; import { STORE_CATALOG } from "@/lib/store-catalog"; import { StoreCheckoutModal, type LockedCourse } from "./store-checkout-modal"; interface Props { courses: LockedCourse[]; buyer: { name: string; email: string }; } // Blurred card body shared by both the modal-trigger button and the // fallback landing link. function CardBody({ course }: { course: LockedCourse }) { return ( <> {/* Overlay: замок + призыв, поверх размытого контента */}
🔒 Подробнее →
{/* Размытый контент карточки */}
{course.coverImage ? ( // eslint-disable-next-line @next/next/no-img-element {course.title} ) : (
📚
)}

{course.title}

{course.description && (

{course.description}

)}
); } export function StoreShowcase({ courses, buyer }: Props) { const [selectedSlug, setSelectedSlug] = useState(null); const selected = courses.find((c) => c.slug === selectedSlug); const selectedEntry = selected ? STORE_CATALOG[selected.slug] : undefined; const cardClass = "card-aubade p-0 overflow-hidden flex flex-col relative group"; return (

Другие курсы Second Brain

{courses.map((course) => { const entry = STORE_CATALOG[course.slug]; if (!entry || entry.tariffs.length === 0) { // Fallback: no catalog entry → keep the old landing link return ( ); } return ( ); })}
{selected && selectedEntry && ( setSelectedSlug(null)} /> )}
); }