Added job lookup framework to tech console. BOD-95 BOD-96
This commit is contained in:
25
client/src/pages/tech-lookup/tech-lookup.container.jsx
Normal file
25
client/src/pages/tech-lookup/tech-lookup.container.jsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import { useQuery } from "@apollo/react-hooks";
|
||||
import queryString from "query-string";
|
||||
import React from "react";
|
||||
import { useHistory, useLocation } from "react-router-dom";
|
||||
import TechLookupJobsList from "../../components/tech-lookup-jobs-list/tech-lookup-jobs-list.component";
|
||||
import { SEARCH_FOR_JOBS } from "../../graphql/jobs.queries";
|
||||
import { Row, Col } from "antd";
|
||||
import TechLookupJobsDrawer from "../../components/tech-lookup-jobs-drawer/tech-lookup-jobs-drawer.component";
|
||||
|
||||
export default function TechLookupContainer() {
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const history = useHistory();
|
||||
|
||||
const { loading, error, data, refetch } = useQuery(SEARCH_FOR_JOBS, {
|
||||
variables: { search: `%${search.ro_number}%` },
|
||||
skip: !!!search.ro_number,
|
||||
});
|
||||
|
||||
return (
|
||||
<div>
|
||||
<TechLookupJobsList />
|
||||
<TechLookupJobsDrawer />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user