diff options
author | eug-vs <eug-vs@keemail.me> | 2020-08-09 16:09:21 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-08-09 16:09:21 +0300 |
commit | 236062c6c6278c4b433463fef9fa37eebf3fd760 (patch) | |
tree | d4451a7a9d0e29cac7c2ea91b1648f7450bbfc6b /src/components/Loading/Loading.tsx | |
parent | 70d20b76f042a519e8e164279dfa31b5ce027d44 (diff) | |
download | which-ui-236062c6c6278c4b433463fef9fa37eebf3fd760.tar.gz |
feat: lazy-load pages
Diffstat (limited to 'src/components/Loading/Loading.tsx')
-rw-r--r-- | src/components/Loading/Loading.tsx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/components/Loading/Loading.tsx b/src/components/Loading/Loading.tsx new file mode 100644 index 0000000..30b8cda --- /dev/null +++ b/src/components/Loading/Loading.tsx @@ -0,0 +1,24 @@ +import React from 'react'; +import CircularProgress from '@material-ui/core/CircularProgress'; +import { makeStyles } from '@material-ui/core'; + +const useStyles = makeStyles(theme => ({ + loader: { + width: '100%', + textAlign: 'center', + marginTop: theme.spacing(10) + } +})); + +const Loading: React.FC = () => { + const classes = useStyles(); + + return ( + <div className={classes.loader}> + <CircularProgress color="primary" style={{ margin: '0 auto' }} /> + </div> + ); +}; + +export default Loading; + |