Cleanup database + updates to apollo error handler to check all errors + added hash history to jobs list.
This commit is contained in:
@@ -8,7 +8,7 @@ import JobsList from "../../components/jobs-list/jobs-list.component";
|
||||
import JobDetailCards from "../../components/job-detail-cards/job-detail-cards.component";
|
||||
|
||||
//TODO: Implement pagination for this.
|
||||
export default function JobsPage() {
|
||||
export default function JobsPage({ match, location }) {
|
||||
const { loading, error, data } = useSubscription(SUBSCRIPTION_ALL_OPEN_JOBS, {
|
||||
fetchPolicy: "network-only"
|
||||
});
|
||||
@@ -18,9 +18,11 @@ export default function JobsPage() {
|
||||
document.title = t("titles.jobs");
|
||||
}, [t]);
|
||||
|
||||
const [selectedJob, setSelectedJob] = useState(null);
|
||||
const { hash } = location;
|
||||
const [selectedJob, setSelectedJob] = useState(hash ? hash.substr(1) : null);
|
||||
console.log("Jobs Page Render.");
|
||||
|
||||
if (error) return <AlertComponent message={error.message} />;
|
||||
if (error) return <AlertComponent message={error.message} type='error' />;
|
||||
return (
|
||||
<Col span={22} offset={1}>
|
||||
<JobsList
|
||||
|
||||
Reference in New Issue
Block a user