Finish the majority of work on vendors page to add/delete/edit.

This commit is contained in:
Patrick Fic
2020-02-13 16:08:34 -08:00
parent d1b14427cc
commit 206c1e268b
12 changed files with 757 additions and 61 deletions

View File

@@ -1,10 +1,13 @@
import React from "react";
import VendorsListContainer from "../../components/vendors-list/vendors-list.container";
import VendorsFormContainer from "../../components/vendors-form/vendors-form.container";
export default function ShopVendorPageComponent({ selectedVendorState }) {
//TODO Figure out how to handle the refresh list when saving form
return (
<div>
<VendorsListContainer selectedVendorState={selectedVendorState} />
<VendorsFormContainer vendor={selectedVendorState[0]} />
</div>
);
}

View File

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