"use client"; import Link from "next/link"; import { useRouter } from "next/navigation"; import { useState } from "react"; import { countryName, formatBirthDate } from "@/lib/astro"; import type { BirthData } from "@/lib/types"; import { BirthForm } from "./BirthForm"; export interface SavedBirth { birth: BirthData; placeName: string | null; region: string | null; countryCode: string | null; zone: string; utcOffset: string; dst: boolean; } /** * Shows the saved birth data, or the form to enter or correct it. Saving opens * the chart page. `notice`: the backend's text about the change limit, if any. */ export function BirthEditor({ chart, chartId, notice, }: { chart: SavedBirth | null; chartId: string | null; notice: string | null; }) { const router = useRouter(); const [editing, setEditing] = useState(chart === null); if (editing || !chart) { return (
A javított adatokból új képlet készül, és az lesz a saját képleted. A régit a meglévő összevetések miatt megtartjuk.
) : (Add meg a születésed adatait. Ebből számoljuk a képletedet; a helyi időt és az akkori időzónát (nyári időszámítást) a születési hely alapján magunk határozzuk meg.
)} {chart && notice &&{notice}
}{notice}
}