"use client"; import { deleteVorlageFlaechendruck } from "./action"; export default function Table({ data, }: { data: { id: number; printer: string; product_type: string; height: number; width: number; coordinates: { x: number; y: number; rotation: number; }[]; }[]; }) { async function onDelete(id: number) { try { await deleteVorlageFlaechendruck(id); window.location.reload(); } catch (error) { console.error(error); alert("An error occurred while deleting the item."); } } return (
| Printer | Product Type | Height | Width | Coordinates | Actions |
|---|---|---|---|---|---|
| {item.printer} | {item.product_type} | {item.height} | {item.width} |
|