"use client"; import { deleteItems } from "@/actions/deleteItem"; import { PencilIcon } from "lucide-react"; import Link from "next/link"; import { Button } from "../ui/button"; import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "../ui/card"; type ItemProps = { id: string name: string slug: string description: string | null sortIndex: number } export default function ItemList({ items, type }: { items: ItemProps[], type: string }) { // const [isMounted, setIsMounted] = useState(false); // useEffect(() => { // setIsMounted(true); // }, []); const handleDelete = (id: string) => { deleteItems(id, type); }; // if (!isMounted) return null; return (
{items.map(item => (
{item.name} {/* {item.type === 'image' && ( {item.altText )} */}
))}
); }