diff --git a/beta/src/components/Layout/HomeContent.js b/beta/src/components/Layout/HomeContent.js index a43d6ab9a..3bcd0b111 100644 --- a/beta/src/components/Layout/HomeContent.js +++ b/beta/src/components/Layout/HomeContent.js @@ -619,21 +619,27 @@ function ExamplePanel({children, noPadding, noShadow, height}) { } function BrowserChrome({children, setPostPromise, setAlbumsPromise}) { + const [restartId, setRestartId] = useState(0); + + const simulatedArtistMs = 200; + const simulatedAlbumsMs = 2200; + function handleRestart() { const artistPromise = new Promise((resolve) => { setTimeout(() => { artistPromise._resolved = true; resolve(); - }, 200); + }, simulatedArtistMs); }); const albumsPromise = new Promise((resolve) => { setTimeout(() => { albumsPromise._resolved = true; resolve(); - }, 2200); + }, simulatedAlbumsMs); }); setPostPromise(artistPromise); setAlbumsPromise(albumsPromise); + setRestartId((id) => id + 1); } return ( @@ -645,7 +651,11 @@ function BrowserChrome({children, setPostPromise, setAlbumsPromise}) { example.com /artists/the-beatles -