import { Route, Switch } from 'react-router-dom';
import React from 'react';
import ApplierPage from './routePage/ApplierPage';
import JobDetailPage from './routePage/JobDetailPage';
import AddJobPage from './routePage/AddJobPage';
import EditJobPage from './routePage/EditJobPage';


const Widget = (props) => {
    return (<Switch>
        <Route path="addjob">
            <AddJobPage {...props} />
        </Route>
        <Route path="editjob/:jobid"
            render={({ match }) => <EditJobPage {...props} jobId={match.params.jobid} />} />
        <Route path="applier/:jobid"
            render={({ match }) => <ApplierPage {...props} jobId={match.params.jobid} />} />
        <Route path="jobdetail/:jobid"
            render={({ match }) => <JobDetailPage {...props} jobId={match.params.jobid} />} />
    </Switch>);
}

export default Widget;