add more items to skeleton for search

This commit is contained in:
Matt Dunn-Rankin 2020-04-24 21:23:03 -07:00
parent eac6b308cd
commit 846b26f4c5
3 changed files with 8 additions and 12 deletions

View file

@ -17,18 +17,14 @@ function ItemList({ items, wornItemIds, dispatchToOutfit }) {
);
}
function ItemListSkeleton() {
function ItemListSkeleton({ count }) {
return (
<Stack spacing="3">
<Box>
<ItemSkeleton />
</Box>
<Box>
<ItemSkeleton />
</Box>
<Box>
{Array.from({ length: count }).map((_, i) => (
<Box key={i}>
<ItemSkeleton />
</Box>
))}
</Stack>
);
}

View file

@ -60,7 +60,7 @@ function SearchResults({ query, outfitState, dispatchToOutfit }) {
if (loading || variables.query !== query) {
return (
<Delay ms={500}>
<ItemListSkeleton />
<ItemListSkeleton count={8} />
</Delay>
);
}

View file

@ -141,7 +141,7 @@ function ItemsPanel({ outfitState, loading, dispatchToOutfit }) {
<Box key={i}>
<Delay>
<Skeleton height="2.3rem" width="12rem" mb="3" />
<ItemListSkeleton />
<ItemListSkeleton count={3} />
</Delay>
</Box>
))}