"use client"; import { useActionState } from "react"; import { hostNotizenSpeichern } from "@/server/actions/host-detail"; import type { AktionsErgebnis } from "@/server/actions/kunden"; const LEER: AktionsErgebnis = {}; export function HostNotizen({ hostId, notizen, tags, }: { hostId: string; notizen: string | null; tags: string[]; }) { const [ergebnis, aktion, laeuft] = useActionState(hostNotizenSpeichern, LEER); return (
{ergebnis.erfolg ?
{ergebnis.erfolg}
: null} {ergebnis.fehler ?
{ergebnis.fehler}
: null}