refactor away ItemsForZone, it's trivial now

This commit is contained in:
Matt Dunn-Rankin 2020-04-22 04:02:43 -07:00
parent 1f5a7e83e1
commit 09b928865e

View file

@ -192,10 +192,10 @@ function ItemsPanel({ zonesAndItems, onWearItem }) {
<Stack spacing="10"> <Stack spacing="10">
{zonesAndItems.map(({ zoneName, items, wornItemId }) => ( {zonesAndItems.map(({ zoneName, items, wornItemId }) => (
<Box key={zoneName}> <Box key={zoneName}>
<ItemsForZone <Heading2 mb="3">{zoneName}</Heading2>
zoneName={zoneName} <ItemList
items={items} items={items}
wornItemId={wornItemId} wornItemIds={[wornItemId]}
onWearItem={onWearItem} onWearItem={onWearItem}
/> />
</Box> </Box>
@ -240,19 +240,6 @@ function OutfitHeading() {
); );
} }
function ItemsForZone({ zoneName, items, wornItemId, onWearItem }) {
return (
<Box>
<Heading2 mb="3">{zoneName}</Heading2>
<ItemList
items={items}
wornItemIds={[wornItemId]}
onWearItem={onWearItem}
/>
</Box>
);
}
function Heading1({ children, ...props }) { function Heading1({ children, ...props }) {
return ( return (
<Heading fontFamily="Delicious" fontWeight="800" size="2xl" {...props}> <Heading fontFamily="Delicious" fontWeight="800" size="2xl" {...props}>