From aee16330801999caed09d77c38a810a5f244a218 Mon Sep 17 00:00:00 2001 From: lina elman Date: Mon, 2 Jun 2025 17:35:49 +0300 Subject: [PATCH 1/3] changed order in left bar & fixed show if more data needed to find linkedin jobs --- nextstep-frontend/src/components/LeftBar.tsx | 6 +++--- nextstep-frontend/src/components/LinkedinJobs.tsx | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) 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..8ed79b4 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."} )} From 57cb0043388860f010992543c7bfb4791548568a Mon Sep 17 00:00:00 2001 From: lina elman Date: Mon, 2 Jun 2025 17:45:56 +0300 Subject: [PATCH 2/3] small fix of color --- nextstep-frontend/src/components/LinkedinJobs.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextstep-frontend/src/components/LinkedinJobs.tsx b/nextstep-frontend/src/components/LinkedinJobs.tsx index 8ed79b4..8592af7 100644 --- a/nextstep-frontend/src/components/LinkedinJobs.tsx +++ b/nextstep-frontend/src/components/LinkedinJobs.tsx @@ -94,7 +94,7 @@ const LinkedinJobs: React.FC = ({ Selected Role:{' '} - {selectedRole ? selectedRole : Choose a role} + {selectedRole ? selectedRole : Choose a role} From 6afca99b9722776007dd65c6ecc4c675b66c99ee Mon Sep 17 00:00:00 2001 From: lina elman Date: Mon, 2 Jun 2025 18:10:49 +0300 Subject: [PATCH 3/3] added small bigs fix --- nextstep-frontend/src/pages/Login.tsx | 3 ++- nextstep-frontend/src/pages/Profile.tsx | 3 ++- nextstep-frontend/src/pages/Register.tsx | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) 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) {