add more items to skeleton for search
This commit is contained in:
parent
eac6b308cd
commit
846b26f4c5
3 changed files with 8 additions and 12 deletions
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ function SearchResults({ query, outfitState, dispatchToOutfit }) {
|
|||
if (loading || variables.query !== query) {
|
||||
return (
|
||||
<Delay ms={500}>
|
||||
<ItemListSkeleton />
|
||||
<ItemListSkeleton count={8} />
|
||||
</Delay>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
))}
|
||||
|
|
Loading…
Reference in a new issue