"use client"; import { RefreshCw, Download, Info } from "lucide-react"; import { Button } from "@/components/ui/button"; interface PageData { id: number; title: string; image: string; prompt: string; characterUpload?: string; style: string; } interface ComicCanvasProps { page: PageData; onInfoClick?: () => void; onNextPage?: () => void; onPrevPage?: () => void; } export function ComicCanvas({ page, onInfoClick, onNextPage, onPrevPage }: ComicCanvasProps) { return (
{/* Dot grid background */}
{`Page { const rect = e.currentTarget.getBoundingClientRect(); const clickX = e.clientX - rect.left; const imageWidth = rect.width; if (clickX > imageWidth / 2) { // Right half - next page onNextPage?.(); } else { // Left half - previous page onPrevPage?.(); } }} />
{/* Page label */}
Page {page.id}
{/* Action buttons below the page image */}
{onInfoClick && ( )}
{/*
Page {page.id}
*/} {/* Mobile action buttons */}
); }