refactor(profile): split account and career into dedicated components
Phase 2.2 — stop backing /profile and /career from one component behind a boolean. /career now renders a dedicated CareerProfilePage; /profile keeps ProfilePage. Each hardcodes its mode and saves only its own concern (identity vs master profile) via the partial-update endpoint. This commit is the behaviour-preserving checkpoint: the two components still share the full implementation (each carries all state, only its own JSX renders). The per-component pruning that removes the other concern's state/JSX follows in subsequent commits, verified by tsc at each step. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -226,18 +226,12 @@ function FieldReviewNote({ metadata }: { metadata?: StructuredCvFieldMetadata })
|
||||
);
|
||||
}
|
||||
|
||||
// careerOnly splits the two Phase 2 surfaces this component still backs:
|
||||
// false -> /profile: account identity + security + preferences
|
||||
// true -> /career: the master career profile (source of truth)
|
||||
// Fully separating this into two components is roadmap 2.2; for now the fork keeps each route's
|
||||
// content — and its Save payload — cleanly scoped.
|
||||
export default function ProfilePage({
|
||||
careerOnly = false,
|
||||
onMasterCvAvailabilityChange,
|
||||
}: {
|
||||
careerOnly?: boolean;
|
||||
onMasterCvAvailabilityChange?: (hasMasterCv: boolean) => void;
|
||||
}) {
|
||||
// ProfilePage backs /profile: account identity + security + preferences. The master career
|
||||
// profile lives in CareerProfilePage (/career). Split in Phase 2.2. Saves only identity fields
|
||||
// (partial update), never the master profile.
|
||||
export default function ProfilePage() {
|
||||
// Retained so the shared JSX reads identically; hardcoded for /profile.
|
||||
const careerOnly = false;
|
||||
const { toast } = useToast();
|
||||
const { t } = useI18n();
|
||||
const cvInputRef = useRef<HTMLInputElement | null>(null);
|
||||
|
||||
Reference in New Issue
Block a user