BOD-8 #comment Fixed up part of the vendor edit page. Refetch of list still oustanding.

This commit is contained in:
Patrick Fic
2020-03-10 14:21:21 -07:00
parent 024ddc2737
commit 8cb6bc6a24
11 changed files with 294 additions and 361 deletions

View File

@@ -4,12 +4,11 @@ import VendorsFormContainer from "../../components/vendors-form/vendors-form.con
export default function ShopVendorPageComponent({ selectedVendorState }) {
//TODO Figure out how to handle the refresh list when saving form
return (
<div>
<VendorsListContainer selectedVendorState={selectedVendorState} />
<VendorsFormContainer
vendorId={selectedVendorState[0] ? selectedVendorState[0].id : null}
/>
<VendorsFormContainer selectedVendor={selectedVendorState[0]} />
</div>
);
}

View File

@@ -7,11 +7,12 @@ export default function ShopVendorPageContainer() {
useEffect(() => {
document.title = t("titles.shop_vendors");
}, [t]);
const fetchState = useState();
const selectedVendorState = useState();
return (
<div>
<ShopVendorPageComponent selectedVendorState={selectedVendorState} />
</div>
<ShopVendorPageComponent
selectedVendorState={selectedVendorState}
fetchState={fetchState}
/>
);
}