From b78cede9397cf9411ef8a3dc33e7628a13abe6b7 Mon Sep 17 00:00:00 2001 From: Matchu Date: Mon, 18 Jan 2021 06:46:18 -0800 Subject: [PATCH] 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. --- src/app/HomePage.js | 47 ++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/src/app/HomePage.js b/src/app/HomePage.js index 685495e..d7f75d3 100644 --- a/src/app/HomePage.js +++ b/src/app/HomePage.js @@ -17,6 +17,7 @@ import { useHistory, useLocation } from "react-router-dom"; import { useLazyQuery, useQuery } from "@apollo/client"; import { + Delay, ErrorMessage, Heading1, Heading2, @@ -299,28 +300,30 @@ function NewItemsSectionContent() { if (loading) { return ( - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + ); }