"use client"; import { ButtonPrimary } from "components/Buttons"; import Image from "next/image"; import Link from "next/link"; import { createNewLeafletFromTemplate } from "actions/createNewLeafletFromTemplate"; import { AddTiny } from "components/Icons/AddTiny"; export function LeafletTemplate(props: { title: string; description?: string; image: string; alt: string; templateID: string; // readonly id for the leaflet that will be duplicated }) { return (
{props.alt}

{props.title}

{props.description && (
{props.description}
)}
Preview { let id = await createNewLeafletFromTemplate( props.templateID, false, ); window.open(`/${id}`, "_blank"); }} > Create
); } export function TemplateList(props: { name: string; description?: string; children: React.ReactNode; }) { return (

{props.name}

{props.description}

{props.children}
); } export function TemplateListThemes() { return ( <> ); } export function TemplateListExamples() { return ( ); }