This commit is contained in:
Timo Knuth
2026-02-27 15:19:24 +01:00
parent b7f8221095
commit 253c3c1c6d
134 changed files with 11188 additions and 1871 deletions

View File

@@ -0,0 +1,21 @@
'use client'
import { trpc } from '@/lib/trpc-client'
import { useRouter } from 'next/navigation'
export function DeactivateButton({ id }: { id: string }) {
const router = useRouter()
const mutation = trpc.stellen.deactivate.useMutation({
onSuccess: () => router.refresh(),
})
return (
<button
onClick={() => mutation.mutate({ id })}
disabled={mutation.isPending}
className="text-sm text-red-600 hover:underline disabled:opacity-50"
>
Deaktivieren
</button>
)
}