diff --git a/nextstep-frontend/src/components/LeftBar.tsx b/nextstep-frontend/src/components/LeftBar.tsx index 9ce8bbb..e085c09 100644 --- a/nextstep-frontend/src/components/LeftBar.tsx +++ b/nextstep-frontend/src/components/LeftBar.tsx @@ -44,11 +44,11 @@ const LeftBar: React.FC = () => { const menuItems = [ { text: 'Dashboard', icon: , path: '/main-dashboard' }, - { text: 'Feed', icon: , path: '/feed' }, - { text: 'Profile', icon: , path: '/profile' }, - { text: 'Chat', icon: , path: '/chat' }, { text: 'Resume', icon: , path: '/resume' }, { text: 'Quiz', icon: , path: '/quiz' }, + { text: 'Feed', icon: , path: '/feed' }, + { text: 'Chat', icon: , path: '/chat' }, + { text: 'Profile', icon: , path: '/profile' }, ]; return ( diff --git a/nextstep-frontend/src/components/LinkedinJobs.tsx b/nextstep-frontend/src/components/LinkedinJobs.tsx index c7f3974..8592af7 100644 --- a/nextstep-frontend/src/components/LinkedinJobs.tsx +++ b/nextstep-frontend/src/components/LinkedinJobs.tsx @@ -92,9 +92,10 @@ const LinkedinJobs: React.FC = ({ - - Selected Role: {selectedRole || 'None'} - + + Selected Role:{' '} + {selectedRole ? selectedRole : Choose a role} + = ({ input.value = ''; } }} + error={settings.skills.length == 0} placeholder="Type a skill and press Enter" sx={{ mt: 1 }} /> @@ -251,7 +253,7 @@ const LinkedinJobs: React.FC = ({ ) : ( - No job recommendations found. Try adjusting your search settings. + {!selectedRole || skills.length == 0 ? "Select a role or add skills to the search." : "No job recommendations found. Try adjusting your search settings."} )} diff --git a/nextstep-frontend/src/pages/Login.tsx b/nextstep-frontend/src/pages/Login.tsx index fcbf007..8543313 100644 --- a/nextstep-frontend/src/pages/Login.tsx +++ b/nextstep-frontend/src/pages/Login.tsx @@ -68,7 +68,8 @@ const Login: React.FC = () => { } catch (error) { const err = error as any; if (err.response && err.response.status === 400 && - err.response.data && err.response.data.errors[0] && + err.response.data && err.response.data.errors && + err.response.data.errors[0] && err.response.data.errors[0].message) { setError(err.response.data.errors[0].message); } else if (err.response && err.response.data) { diff --git a/nextstep-frontend/src/pages/Profile.tsx b/nextstep-frontend/src/pages/Profile.tsx index f68e880..4d405e2 100644 --- a/nextstep-frontend/src/pages/Profile.tsx +++ b/nextstep-frontend/src/pages/Profile.tsx @@ -104,7 +104,8 @@ const Profile: React.FC = () => { }, 2000); } catch (err: any) { if (err.response && err.response.status === 400 && - err.response.data && err.response.data.errors[0] && + err.response.data && err.response.data.errors && + err.response.data.errors[0] && err.response.data.errors[0].message) { setError(err.response.data.errors[0].message); } else { diff --git a/nextstep-frontend/src/pages/Register.tsx b/nextstep-frontend/src/pages/Register.tsx index 78e3616..1caaad4 100644 --- a/nextstep-frontend/src/pages/Register.tsx +++ b/nextstep-frontend/src/pages/Register.tsx @@ -62,7 +62,8 @@ const Register: React.FC = () => { } catch (error) { const err = error as any; if (err.response && err.response.status === 400 && - err.response.data && err.response.data.errors[0] && + err.response.data && err.response.data.errors && + err.response.data.errors[0] && err.response.data.errors[0].message) { setError(err.response.data.errors[0].message); } else if (err.response && err.response.data) {