Skip to content

Commit ed92e82

Browse files
committed
Only show indeterminate progress bar before site entity exists
1 parent c13f1ba commit ed92e82

File tree

1 file changed

+4
-10
lines changed
  • packages/playground/website/src/components/playground-viewport

1 file changed

+4
-10
lines changed

packages/playground/website/src/components/playground-viewport/index.tsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import {
1616
selectSitesLoaded,
1717
selectTemporarySites,
1818
} from '../../lib/state/redux/slice-sites';
19-
import { selectClientInfoBySiteSlug } from '../../lib/state/redux/slice-clients';
2019
import classNames from 'classnames';
2120
import { SiteErrorModal } from '../site-error-modal';
2221

@@ -63,12 +62,6 @@ export const KeepAliveTemporarySitesViewport = () => {
6362
const activeSiteSlugIsSet = useAppSelector(
6463
(state) => !!state.ui.activeSite?.slug
6564
);
66-
// Check if the active site has a client (i.e., is fully booted)
67-
const activeSiteHasClient = useAppSelector((state) =>
68-
activeSite
69-
? !!selectClientInfoBySiteSlug(state, activeSite.slug)
70-
: false
71-
);
7265
const siteSlugsToRender = useMemo(() => {
7366
let sites = temporarySites.filter(
7467
(site) => site.slug !== activeSite?.slug
@@ -167,9 +160,10 @@ export const KeepAliveTemporarySitesViewport = () => {
167160
</div>
168161
</div>
169162
)}
170-
{((!activeSite && activeSiteSlugIsSet) ||
171-
(activeSite && !activeSiteHasClient)) && (
172-
// Show a progress bar while the site is being created or booted
163+
{!activeSite && activeSiteSlugIsSet && (
164+
// Show a progress bar while the site is being created.
165+
// Once the site exists and is being rendered, the iframe
166+
// will show its own loading screen ("Preparing WordPress...").
173167
<div className={css.loadingViewport}>
174168
<h3 className={css.loadingCaption}>&nbsp;</h3>
175169
<div className={css.progressWrapper}>

0 commit comments

Comments
 (0)