"use client"; import { useRouter } from "next/navigation"; import { useState } from "react"; import Button, { buttonClassName } from "@/components/ui/Button"; import FileDropZone, { VPX_FILE_INPUT_ID } from "@/components/FileDropZone"; import TableStaging from "./TableStaging"; import { setPendingTable } from "@/lib/pinball/tableSelectionStore"; export default function AttractHero() { const router = useRouter(); const [error, setError] = useState(null); const [stagedFile, setStagedFile] = useState(null); const handleFile = (file: File) => { setError(null); setStagedFile(file); }; const handlePlay = (romFile: File | undefined, saveToLibrary: boolean) => { if (!stagedFile) return; setPendingTable({ kind: "upload", vpxFile: stagedFile, romFile, saveToLibrary }); router.push("/play"); }; if (stagedFile) { return (
setStagedFile(null)} />
); } return (
{/* Backglass glow — stands in for real playfield art; GI-lamp amber + a cyan tube accent. */}

WEBASSEMBLY · WEBGL2 · REAL .VPX TABLES

VPINBALL

Real Visual Pinball tables, playing in your browser. Drop in a{" "} .vpx file, or try the bundled demo.

or drag a .vpx file anywhere onto this panel

{error && (

{error}

)}
); }