MCPcopy Create free account
hub / github.com/Packstack-Tech/packstack / fetchItems

Function fetchItems

frontend/src/app/Inventory/index.tsx:38–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36 }, []);
37
38 function fetchItems() {
39 getItems()
40 .then(items => {
41 const categories = getCategories(items);
42 const rowItems = Object.assign([], items.map(i => ({ ...i, refresh: fetchItems })));
43 setItems(rowItems);
44 setCategories(categories);
45 setLoading(false);
46 })
47 .catch(err => console.warn(err));
48 }
49
50 function renderTables() {
51 const tables = categories.map(cat => {

Callers 3

handleDeleteFunction · 0.85
handleSubmitFunction · 0.85
InventoryFunction · 0.85

Calls 1

getCategoriesFunction · 0.90

Tested by

no test coverage detected