import React from 'react'; import { motion } from 'framer-motion'; import { UploadIcon } from './Icons'; const CVForm = ({ profileData, photoUrl, resumeFile, isEditing, handlePhotoChange, handleFileChange }) => { const getBaseName = (path) => { if (!path) return 'Existing Resume'; return path.substring(path.lastIndexOf('/') + 1).substring(path.indexOf('_') + 1); }; return (
{/* ========= AVATAR SECTION UPDATED ========= */}

Your Avatar

{/* Conditionally render DIV for real photo, or IMG for fallback */} {photoUrl ? (
) : ( Profile )}
{/* Upload Section - ONLY VISIBLE IN EDIT MODE */} {isEditing && (
)}
{/* Resume Section (No changes needed here) */}

Your Resume {/* This is the new status badge */} {(profileData?.resume_url) && ( On File )}

{(resumeFile || profileData?.resume_url) ? (

{resumeFile ? resumeFile.name : getBaseName(profileData?.resume_url)}

{resumeFile ? 'New file selected' : ''}

) : (

No resume has been uploaded.

)} {isEditing && (
)}
); }; export default CVForm;