From 3001efa6f862a45d4074a8a1e50b83d02bbfd755 Mon Sep 17 00:00:00 2001 From: Tom Date: Wed, 25 Sep 2019 23:15:13 +1000 Subject: [PATCH] Revert "Add "Create new job" button in JobPostingsPage" --- .../company/containers/CreateNewJob.tsx | 11 --------- .../{JobPostingsPage => }/JobPostingsPage.tsx | 23 ++++++++----------- .../JobPostingsPage/JobPostingsPage.scss | 21 ----------------- src/modules/core/containers/App/App.tsx | 4 +--- 4 files changed, 11 insertions(+), 48 deletions(-) delete mode 100644 src/modules/company/containers/CreateNewJob.tsx rename src/modules/company/containers/{JobPostingsPage => }/JobPostingsPage.tsx (71%) delete mode 100644 src/modules/company/containers/JobPostingsPage/JobPostingsPage.scss diff --git a/src/modules/company/containers/CreateNewJob.tsx b/src/modules/company/containers/CreateNewJob.tsx deleted file mode 100644 index 9dcde3e..0000000 --- a/src/modules/company/containers/CreateNewJob.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react'; -import pageWrapper from '../../shared/components/PageWrapper/PageWrapper' -import { EUserType } from '../../../models/UserType' - -const CreateNewJob = () => { - return
-

Create new job page

-
; -}; - -export default pageWrapper(CreateNewJob, { authorisedUserTypes: [EUserType.Company] }) diff --git a/src/modules/company/containers/JobPostingsPage/JobPostingsPage.tsx b/src/modules/company/containers/JobPostingsPage.tsx similarity index 71% rename from src/modules/company/containers/JobPostingsPage/JobPostingsPage.tsx rename to src/modules/company/containers/JobPostingsPage.tsx index 37af579..3f01fa1 100644 --- a/src/modules/company/containers/JobPostingsPage/JobPostingsPage.tsx +++ b/src/modules/company/containers/JobPostingsPage.tsx @@ -1,18 +1,16 @@ import React from 'react' -import { Link } from 'react-router-dom' -import pageWrapper from '../../../shared/components/PageWrapper/PageWrapper' -import { EUserType } from '../../../../models/UserType' -import List from '../../../shared/components/List/List' -import { IJob } from '../../../../models/Job' -import { ListItemVM } from '../../../shared/components/ListItem/ListItemModels' +import pageWrapper from '../../shared/components/PageWrapper/PageWrapper' +import { EUserType } from '../../../models/UserType' +import List from '../../shared/components/List/List' +import { IJob } from '../../../models/Job' +import { ListItemVM } from '../../shared/components/ListItem/ListItemModels' import { useQuery } from '@apollo/react-hooks' import gql from 'graphql-tag' -import Loading from '../../../shared/components/Loading/Loading' -import Error from '../../../shared/components/Error/Error' +import Loading from '../../shared/components/Loading/Loading' +import Error from '../../shared/components/Error/Error' import { useSelector } from 'react-redux' -import { userSelector } from '../../../../redux/slices/authenticationSlice' -import { IUser } from '../../../../models/User' -import './JobPostingsPage.scss' +import { userSelector } from '../../../redux/slices/authenticationSlice' +import { IUser } from '../../../models/User' const JobPostingsPage = () => { const user: IUser = useSelector(userSelector); @@ -69,8 +67,7 @@ const JobPostingsPage = () => { if (error) return ; return ( -
- Create new job +
) diff --git a/src/modules/company/containers/JobPostingsPage/JobPostingsPage.scss b/src/modules/company/containers/JobPostingsPage/JobPostingsPage.scss deleted file mode 100644 index 1076878..0000000 --- a/src/modules/company/containers/JobPostingsPage/JobPostingsPage.scss +++ /dev/null @@ -1,21 +0,0 @@ -.job-postings { - text-align: center; - - &__new { - padding: 12px 48px; - display: inline-block; - margin-bottom: var(--spacing-3); - border-radius: 16px; - color: var(--gray-800); - border: 1px solid var(--gray-800); - - &:visited { - color: var(--gray-800); - text-decoration: none; - } - - &:hover { - background: var(--purple-300); - } - } -} \ No newline at end of file diff --git a/src/modules/core/containers/App/App.tsx b/src/modules/core/containers/App/App.tsx index c1eab07..4e503f2 100644 --- a/src/modules/core/containers/App/App.tsx +++ b/src/modules/core/containers/App/App.tsx @@ -16,11 +16,10 @@ import Navigation from '../Navigation/Navigation'; import PotentialJobsPage from '../../../seeker/containers/PotentialJobsPage/PotentialJobsPage'; import PotentialJobDetailsPage from '../../../seeker/containers/PotentialJobDetailsPage/PotentialJobDetailsPage'; import Header from '../../components/Header/Header'; -import JobPostingsPage from '../../../company/containers/JobPostingsPage/JobPostingsPage'; +import JobPostingsPage from '../../../company/containers/JobPostingsPage'; import MatchedJobDetailsPage from '../../../seeker/containers/MatchedJobDetailsPage/MatchedJobDetailsPage'; import NotFoundPage from '../NotFoundPage/NotFoundPage'; import JobPostingDetailsPage from '../../../company/containers/JobPostingDetailsPage'; -import CreateNewJob from '../../../company/containers/CreateNewJob'; library.add(far, fas); @@ -70,7 +69,6 @@ const App: React.FC = () => { - { if (user && user.isCompany) { return ()