diff --git a/src/components/CareerExplorer.js b/src/components/CareerExplorer.js index 9977509..0aa854e 100644 --- a/src/components/CareerExplorer.js +++ b/src/components/CareerExplorer.js @@ -61,7 +61,6 @@ const STATES = [ { name: 'Wyoming', code: 'WY' }, ]; -// 2) Helper to convert state code => full name function getFullStateName(code) { const found = STATES.find((s) => s.code === code?.toUpperCase()); return found ? found.name : ''; @@ -142,7 +141,7 @@ function CareerExplorer({ }) { } else { // No inventory => no suggestions (or do something else here) setCareerSuggestions([]); - } + } // 4) Check if all priorities are answered const priorities = profileData.career_priorities @@ -168,8 +167,7 @@ function CareerExplorer({ }) { fetchUserProfile(); }, [apiUrl]); - - // Load suggestions from Interest Inventory if provided (optional) + useEffect(() => { if (location.state?.careerSuggestions) { setCareerSuggestions(location.state.careerSuggestions); @@ -207,13 +205,10 @@ function CareerExplorer({ }) { console.log('[handleCareerClick] career =>', career); const socCode = career.code; setSelectedCareer(career); - setLoading(true); setError(null); setCareerDetails({}); setSalaryData([]); setEconomicProjections({}); - setError(null); - setLoading(true); // We can set selectedCareer immediately so that our Modal condition is met. setSelectedCareer(career); @@ -221,7 +216,6 @@ function CareerExplorer({ }) { if (!socCode) { console.error('SOC Code is missing'); setError('SOC Code is missing'); - setLoading(false); return; } @@ -382,7 +376,6 @@ function CareerExplorer({ }) { } }; - const addCareerToList = (career) => { const masterRatings = getCareerRatingsBySocCode(career.code); @@ -528,8 +521,12 @@ function CareerExplorer({ }) {
Loading career details...
+