BOD-17 Added Contracts list page + updates and bugfixes on other pages.
This commit is contained in:
19
client/src/pages/contracts/contracts.page.container.jsx
Normal file
19
client/src/pages/contracts/contracts.page.container.jsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import React from "react";
|
||||
import ContractsPageComponent from "./contracts.page.component";
|
||||
import { useQuery } from "@apollo/react-hooks";
|
||||
import { QUERY_ACTIVE_CONTRACTS } from "../../graphql/cccontracts.queries";
|
||||
import AlertComponent from "../../components/alert/alert.component";
|
||||
|
||||
export default function ContractsPageContainer() {
|
||||
const { loading, error, data } = useQuery(QUERY_ACTIVE_CONTRACTS);
|
||||
|
||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||
return (
|
||||
<div>
|
||||
<ContractsPageComponent
|
||||
loading={loading}
|
||||
data={data ? data.cccontracts : []}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user