2026-11-17 11:03:55 +00:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
import { useRouter } from "next/navigation";
|
|
|
|
|
|
|
|
|
|
import { BirthForm } from "@/app/profil/BirthForm";
|
|
|
|
|
import type { BirthData } from "@/lib/types";
|
|
|
|
|
|
|
|
|
|
export function EditPerson({
|
|
|
|
|
id,
|
|
|
|
|
name,
|
|
|
|
|
initial,
|
|
|
|
|
}: {
|
|
|
|
|
id: string;
|
|
|
|
|
name: string;
|
|
|
|
|
initial: BirthData & { placeName: string | null; region: string | null };
|
|
|
|
|
}) {
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
return (
|
|
|
|
|
<BirthForm
|
|
|
|
|
initial={initial}
|
|
|
|
|
person={{ chartId: id, name }}
|
2026-11-17 11:20:26 +00:00
|
|
|
onCancel={() => router.push("/szemelyek")}
|
2026-11-17 11:03:55 +00:00
|
|
|
onSaved={() => {
|
|
|
|
|
router.push(`/kepletek/${id}`);
|
|
|
|
|
router.refresh();
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
}
|