import React from 'react';
// Hypothetical Button component from your UI library
import { Button } from '../ui/button.js'; // Adjust path if needed
/**
* Helper to format numeric fields for display.
* If val is null/undefined or 0 and you want to hide it,
* you can adapt the logic below.
*/
function formatNum(val) {
// If val is null or undefined, show 'N/A'
if (val == null) return 'N/A';
// If you'd like to hide zero, you could do:
// if (val === 0) return 'N/A';
return val;
}
function ReviewPage({
careerData = {},
financialData = {},
collegeData = {},
onSubmit,
onBack
}) {
// Decide if user is in or planning to be in college
const inOrPlanningCollege = (
careerData.college_enrollment_status === 'currently_enrolled'
|| careerData.college_enrollment_status === 'prospective_student'
);
return (
Review Your Info
{/* --- CAREER SECTION --- */}
Career Info
Career Name: {careerData.career_name || 'N/A'}
Currently Working: {careerData.currently_working || 'N/A'}
College enrollment Status: {careerData.college_enrollment_status || 'N/A'}
Status: {careerData.status || 'N/A'}
Start Date: {careerData.start_date || 'N/A'}
Projected End Date: {careerData.projected_end_date || 'N/A'}
Career Goals: {careerData.career_goals || 'N/A'}
{/* --- FINANCIAL SECTION --- */}
Financial Info
{/* Current/Additional Income */}
{careerData.currently_working === 'yes' ? (
Current Annual Salary: {formatNum(financialData.current_salary)}