mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 15:13:21 +00:00
Add full page loader
This commit is contained in:
parent
1536896f62
commit
84871a0fd5
@ -3,9 +3,9 @@
|
||||
*/
|
||||
import Loadable from 'react-loadable';
|
||||
|
||||
import LoadingIndicator from 'components/LoadingIndicator';
|
||||
import LoadingIndicatorPage from 'components/LoadingIndicatorPage';
|
||||
|
||||
export default Loadable({
|
||||
loader: () => import('./index'),
|
||||
loading: LoadingIndicator,
|
||||
loading: LoadingIndicatorPage,
|
||||
});
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import Loadable from 'react-loadable';
|
||||
|
||||
import LoadingIndicator from 'components/LoadingIndicator';
|
||||
import LoadingIndicatorPage from 'components/LoadingIndicatorPage';
|
||||
|
||||
export default Loadable({
|
||||
loader: () => import('./index'),
|
||||
loading: LoadingIndicator,
|
||||
loading: LoadingIndicatorPage,
|
||||
});
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import Loadable from 'react-loadable';
|
||||
|
||||
import LoadingIndicator from 'components/LoadingIndicator';
|
||||
import LoadingIndicatorPage from 'components/LoadingIndicatorPage';
|
||||
|
||||
export default Loadable({
|
||||
loader: () => import('./index'),
|
||||
loading: LoadingIndicator,
|
||||
loading: LoadingIndicatorPage,
|
||||
});
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import Loadable from 'react-loadable';
|
||||
|
||||
import LoadingIndicator from 'components/LoadingIndicator';
|
||||
import LoadingIndicatorPage from 'components/LoadingIndicatorPage';
|
||||
|
||||
export default Loadable({
|
||||
loader: () => import('./index'),
|
||||
loading: LoadingIndicator,
|
||||
loading: LoadingIndicatorPage,
|
||||
});
|
||||
|
||||
@ -12,14 +12,14 @@ import './public-path.js'; // eslint-disable-line import/extensions
|
||||
import React from 'react';
|
||||
import Loadable from 'react-loadable';
|
||||
import { Provider } from 'react-redux';
|
||||
import LoadingIndicator from 'components/LoadingIndicator';
|
||||
import LoadingIndicatorPage from 'components/LoadingIndicatorPage';
|
||||
import configureStore from './store';
|
||||
import { translationMessages } from './i18n';
|
||||
|
||||
|
||||
const LoadableApp = Loadable({
|
||||
loader: () => import('containers/App'),
|
||||
loading: LoadingIndicator,
|
||||
loading: LoadingIndicatorPage,
|
||||
});
|
||||
|
||||
const tryRequireRoot = (source) => {
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
/**
|
||||
*
|
||||
* LoadingIndicatorPage
|
||||
*
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import styles from './styles.scss';
|
||||
|
||||
const LoadingIndicatorPage = () => {
|
||||
return (
|
||||
<div className={styles.loaderPage}><div /></div>
|
||||
);
|
||||
};
|
||||
|
||||
export default LoadingIndicatorPage;
|
||||
@ -0,0 +1,21 @@
|
||||
.loaderPage {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
> div {
|
||||
margin: auto;
|
||||
border: 6px solid #f3f3f3; /* Light grey */
|
||||
border-top: 6px solid #3498db; /* Blue */
|
||||
border-radius: 50%;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
animation: spin 2s linear infinite;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user