Remove the Spinner component while loading the store alerts (https://github.com/woocommerce/woocommerce-admin/pull/7886)

* Remove Spinner

* Add changelog

* Use null so it render nothing

* Update changelog
This commit is contained in:
Moon 2021-11-02 21:17:26 -07:00 committed by GitHub
parent 04a9091c29
commit 6747e90ceb
2 changed files with 5 additions and 2 deletions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: Tweak
Remove the Spinner component to prevent undesired page flickering. #7886

View File

@ -9,7 +9,6 @@ import { Router, Route, Switch } from 'react-router-dom';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { get, isFunction, identity } from 'lodash'; import { get, isFunction, identity } from 'lodash';
import { parse } from 'qs'; import { parse } from 'qs';
import { Spinner } from '@woocommerce/components';
import { getHistory, getQuery } from '@woocommerce/navigation'; import { getHistory, getQuery } from '@woocommerce/navigation';
import { getSetting } from '@woocommerce/wc-admin-settings'; import { getSetting } from '@woocommerce/wc-admin-settings';
import { import {
@ -51,7 +50,7 @@ export class PrimaryLayout extends Component {
id="woocommerce-layout__primary" id="woocommerce-layout__primary"
> >
{ window.wcAdminFeatures[ 'store-alerts' ] && ( { window.wcAdminFeatures[ 'store-alerts' ] && (
<Suspense fallback={ <Spinner /> }> <Suspense fallback={ null }>
<StoreAlerts /> <StoreAlerts />
</Suspense> </Suspense>
) } ) }