import {ProductItem} from "./ProductItem"; import React from "react"; import {useShopStore} from "./shop_store"; export function BacklogGroups() { const data = useShopStore((state) => state.groups); const items = useShopStore((state) => state.cards); const ordered_groups = data.categories.map(groupItem => ({ name: groupItem.name, items: groupItem.itemIds.map(itemId => items[itemId]) })); let item_index = -1; const groups = ordered_groups.map((group, g_index) => { return (

{group.items.map(item => { item_index++; return ( ) })}
); } ); return (
{groups}
) }