Added Loading to CareerExplorer

This commit is contained in:
Josh 2025-05-14 15:27:16 +00:00
parent 7bb176c12a
commit 18a7054b20

View File

@ -291,8 +291,28 @@ function CareerExplorer({ handleCareerClick, userState, areaTitle }) {
return weightMap[priority][response] || 1;
};
const renderLoadingOverlay = () => {
if (!loading) return null;
return (
<div className="fixed inset-0 z-50 flex items-center justify-center bg-gray-900 bg-opacity-50">
<div className="rounded bg-white p-6 shadow-lg">
<div className="mb-2 w-full max-w-md rounded bg-gray-200">
<div
className="h-2 rounded bg-blue-500 transition-all"
style={{ width: `${progress}%` }}
/>
</div>
<p className="mt-1 text-center text-sm text-gray-600">
{progress}% Loading Career Suggestions...
</p>
</div>
</div>
);
};
return (
<div className="career-explorer-container bg-white p-6 rounded shadow">
{renderLoadingOverlay()}
{showModal && (
<CareerPrioritiesModal
userProfile={userProfile}