File "with-suspense.js"
Full Path: /home/fresvfqn/waterdamagerestorationandrepairsmithtown.com/wp-content/plugins/surerank/src/apps/admin-components/hoc/with-suspense.js
File size: 359 bytes
MIME-type: text/x-java
Charset: utf-8
import { Suspense } from '@wordpress/element';
import AdminLoadingSkeleton from '../loading-skeleton';
const withSuspense = (
Component,
FallbackComponent = AdminLoadingSkeleton
) => {
return ( props ) => {
return (
<Suspense fallback={ <FallbackComponent /> }>
<Component { ...props } />
</Suspense>
);
};
};
export default withSuspense;