Add brief delay before Latest Items loading state
This UI generally loads very fast, thanks to the CDN cache, so the flash of skeleton content is more distracting than anything else! We still show it quickly after 300ms, but good network connections should reliably get it loaded before then.
This commit is contained in:
parent
f3633f5ab6
commit
b78cede939
1 changed files with 25 additions and 22 deletions
|
@ -17,6 +17,7 @@ import { useHistory, useLocation } from "react-router-dom";
|
|||
import { useLazyQuery, useQuery } from "@apollo/client";
|
||||
|
||||
import {
|
||||
Delay,
|
||||
ErrorMessage,
|
||||
Heading1,
|
||||
Heading2,
|
||||
|
@ -299,6 +300,7 @@ function NewItemsSectionContent() {
|
|||
|
||||
if (loading) {
|
||||
return (
|
||||
<Delay>
|
||||
<ItemCardHStack>
|
||||
<SquareItemCardSkeleton />
|
||||
<SquareItemCardSkeleton minHeightNumLines={3} />
|
||||
|
@ -321,6 +323,7 @@ function NewItemsSectionContent() {
|
|||
<SquareItemCardSkeleton />
|
||||
<SquareItemCardSkeleton />
|
||||
</ItemCardHStack>
|
||||
</Delay>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue