page.tsx still owns the chat main chain, but the first product surfaces now live in their own modules so later splits can land without editing the 4k-line Home. Source-lock tests follow the moved tokens; the orphan user-data contract is aligned and added to the quick gate. Co-authored-by: Cursor <cursoragent@cursor.com>
41 lines
1.5 KiB
TypeScript
41 lines
1.5 KiB
TypeScript
"use client";
|
|
|
|
import { BirthPlacePicker } from "@/components/birth-place-picker";
|
|
import type { Profile } from "@/lib/home-types";
|
|
|
|
export function BirthLocationFields({ value, onChange }: { value: Profile; onChange: (profile: Profile) => void }) {
|
|
return (
|
|
<fieldset className="location-fieldset">
|
|
<legend>出生地点</legend>
|
|
<BirthPlacePicker
|
|
value={{
|
|
countryCode: value.countryCode,
|
|
provinceCode: value.provinceCode,
|
|
cityCode: value.cityCode,
|
|
districtCode: value.districtCode,
|
|
timezoneId: value.timezoneId,
|
|
timezoneOffset: value.timezoneOffset,
|
|
}}
|
|
birthDate={value.date}
|
|
birthTime={value.reportedTime || value.time}
|
|
onChange={(location) => onChange({
|
|
...value,
|
|
countryCode: location?.countryCode || "CN",
|
|
provinceCode: location?.provinceCode || "",
|
|
cityCode: location?.cityCode || "",
|
|
districtCode: location?.districtCode || "",
|
|
birthPlaceLabel: location?.label || "",
|
|
birthPlaceType: location?.placeType || "",
|
|
birthPlaceProvider: location?.provider || "",
|
|
birthPlaceProviderId: location?.providerPlaceId || "",
|
|
timezoneId: location?.timezoneId || "",
|
|
timezoneSource: location ? "iana_historical" : "",
|
|
latitude: location?.latitude ?? null,
|
|
longitude: location?.longitude ?? null,
|
|
timezoneOffset: location?.timezoneOffset ?? null,
|
|
})}
|
|
/>
|
|
</fieldset>
|
|
);
|
|
}
|