Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nextstep-frontend/src/components/LeftBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ const LeftBar: React.FC = () => {

const menuItems = [
{ text: 'Dashboard', icon: <Home />, path: '/main-dashboard' },
{ text: 'Feed', icon: <Feed />, path: '/feed' },
{ text: 'Profile', icon: <Person />, path: '/profile' },
{ text: 'Chat', icon: <Message />, path: '/chat' },
{ text: 'Resume', icon: <DocumentScannerTwoTone />, path: '/resume' },
{ text: 'Quiz', icon: <Quiz />, path: '/quiz' },
{ text: 'Feed', icon: <Feed />, path: '/feed' },
{ text: 'Chat', icon: <Message />, path: '/chat' },
{ text: 'Profile', icon: <Person />, path: '/profile' },
];

return (
Expand Down
10 changes: 6 additions & 4 deletions nextstep-frontend/src/components/LinkedinJobs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,10 @@ const LinkedinJobs: React.FC<LinkedinJobsProps> = ({
<Box sx={{ mb: 3 }}>
<Grid container spacing={2}>
<Grid item xs={12}>
<Typography variant="body2" color="text.secondary">
<strong>Selected Role:</strong> {selectedRole || 'None'}
</Typography>
<Typography variant="body2" color="text.secondary">
<strong color="text.secondary">Selected Role:</strong>{' '}
{selectedRole ? selectedRole : <span style={{ color: 'red' }}>Choose a role</span>}
</Typography>
</Grid>
<Grid item xs={12} sm={6}>
<TextField
Expand Down Expand Up @@ -180,6 +181,7 @@ const LinkedinJobs: React.FC<LinkedinJobsProps> = ({
input.value = '';
}
}}
error={settings.skills.length == 0}
placeholder="Type a skill and press Enter"
sx={{ mt: 1 }}
/>
Expand Down Expand Up @@ -251,7 +253,7 @@ const LinkedinJobs: React.FC<LinkedinJobsProps> = ({
</Grid>
) : (
<Typography variant="body2" color="text.secondary" textAlign="center" sx={{ mt: 2 }}>
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."}
</Typography>
)}

Expand Down
3 changes: 2 additions & 1 deletion nextstep-frontend/src/pages/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion nextstep-frontend/src/pages/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion nextstep-frontend/src/pages/Register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading