Skip to content

Commit

Permalink
fix Editor Sidebar Loading State
Browse files Browse the repository at this point in the history
  • Loading branch information
officiallygod committed Mar 8, 2025
1 parent f919c6e commit f0708e0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { lazy, useEffect, useState } from '@wordpress/element';
import { store as nfdOnboardingStore } from '../../../../../store';
import getContents from './contents';
import { getCustomizeSidebarData } from '../../../../../utils/api/siteGen';
import OrbAnimation from '../../../../../components/OrbAnimation';

const DesignFontsPanel = lazy( () =>
import(
Expand Down Expand Up @@ -45,7 +46,11 @@ const Customize = forwardRef( ( props, ref ) => {
}, [] );

if ( loading ) {
return <div>...</div>;
return (
<div className="nfd-onboarding-sidebar-learn-more__loading">
<OrbAnimation height={ `60px` } />
</div>
);
}

const content = getContents();
Expand Down
8 changes: 8 additions & 0 deletions src/OnboardingSPA/steps/SiteGen/Editor/stylesheet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,11 @@
}
}
}

.nfd-onboarding-sidebar-learn-more__loading {
height: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}

0 comments on commit f0708e0

Please sign in to comment.