diff --git a/src/App.jsx b/src/App.jsx index 7b1a003..61d5567 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,15 +1,15 @@ import {Route, createBrowserRouter, createRoutesFromElements, RouterProvider} from 'react-router-dom' -import homepage from './pages/homepage' -import mainlayout from './layouts/mainlayout' -import jobspage from './pages/jobspage'; -import notfoundpage from './pages/notfoundpage'; +import HomePage from './pages/HomePage' +import MainLayout from './layouts/MainLayout' +import JobsPage from './pages/JobsPage'; +import NotFoundPage from './pages/NotFoundPage'; const router = createBrowserRouter( createRoutesFromElements( - }> - } /> - } /> - } /> + }> + } /> + } /> + } /> diff --git a/src/components/joblistings.jsx b/src/components/joblistings.jsx index 1f10f60..57625b6 100644 --- a/src/components/joblistings.jsx +++ b/src/components/joblistings.jsx @@ -1,9 +1,9 @@ import React from 'react' import jobs from '../jobs.json' -import joblisting from './joblistings' +import jobListing from './jobListings' -const joblistings = () => { - const recentjobs = jobs.slice(0,3); +const jobListings = ({isHome}) => { + const jobListings = isHome ? jobs.slice(0,3) : jobs; return (
@@ -11,8 +11,8 @@ const joblistings = () => { Browse Jobs
- {recentjobs.map((job) => ( - + {jobListings.map((job) => ( + ))}
diff --git a/src/pages/homepage.jsx b/src/pages/homepage.jsx index 881df5e..c1c1edf 100644 --- a/src/pages/homepage.jsx +++ b/src/pages/homepage.jsx @@ -1,7 +1,7 @@ import React from 'react'; import hero from '../components/hero'; import homecards from '../components/homecards'; -import joblistings from '../components/joblistings'; +import joblistings from '../components/jobListings'; import viewalljobs from '../components/viewalljobs'; const homepage = () => { diff --git a/src/pages/jobspage.jsx b/src/pages/jobspage.jsx index 52f1edf..fd6149a 100644 --- a/src/pages/jobspage.jsx +++ b/src/pages/jobspage.jsx @@ -1,11 +1,11 @@ import React from 'react' +import joblistings from '../components/jobListings' const jobspage = () => { - return ( -
- -
- ) + return +
+ +
} export default jobspage