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 (
|
return (
|
||||||
<Stack spacing="3">
|
<Stack spacing="3">
|
||||||
<Box>
|
{Array.from({ length: count }).map((_, i) => (
|
||||||
<ItemSkeleton />
|
<Box key={i}>
|
||||||
</Box>
|
<ItemSkeleton />
|
||||||
<Box>
|
</Box>
|
||||||
<ItemSkeleton />
|
))}
|
||||||
</Box>
|
|
||||||
<Box>
|
|
||||||
<ItemSkeleton />
|
|
||||||
</Box>
|
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ function SearchResults({ query, outfitState, dispatchToOutfit }) {
|
||||||
if (loading || variables.query !== query) {
|
if (loading || variables.query !== query) {
|
||||||
return (
|
return (
|
||||||
<Delay ms={500}>
|
<Delay ms={500}>
|
||||||
<ItemListSkeleton />
|
<ItemListSkeleton count={8} />
|
||||||
</Delay>
|
</Delay>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ function ItemsPanel({ outfitState, loading, dispatchToOutfit }) {
|
||||||
<Box key={i}>
|
<Box key={i}>
|
||||||
<Delay>
|
<Delay>
|
||||||
<Skeleton height="2.3rem" width="12rem" mb="3" />
|
<Skeleton height="2.3rem" width="12rem" mb="3" />
|
||||||
<ItemListSkeleton />
|
<ItemListSkeleton count={3} />
|
||||||
</Delay>
|
</Delay>
|
||||||
</Box>
|
</Box>
|
||||||
))}
|
))}
|
||||||
|
|
Loading…
Reference in a new issue