'use client' import { useState, useTransition } from 'react' import { Button } from '@/components/ui/button' import { archiveProductAction } from '@/actions/products' import { debugProps } from '@/lib/debug' interface ArchiveProductButtonProps { productId: string } export function ArchiveProductButton({ productId }: ArchiveProductButtonProps) { const [confirming, setConfirming] = useState(false) const [isPending, startTransition] = useTransition() function handleArchive() { startTransition(async () => { await archiveProductAction(productId) }) } if (confirming) { return (