File tree Expand file tree Collapse file tree 2 files changed +22
-8
lines changed
Expand file tree Collapse file tree 2 files changed +22
-8
lines changed Original file line number Diff line number Diff line change 2222 "jszip" : " ^3.4.0" ,
2323 "less" : " ^3.9.0" ,
2424 "less-loader" : " ^5.0.0" ,
25+ "nprogress" : " ^0.2.0" ,
2526 "prop-types" : " ^15.7.2" ,
2627 "react" : " ^16.13.1" ,
2728 "react-beautiful-dnd" : " ^13.0.0" ,
Original file line number Diff line number Diff line change 1- import React from "react" ;
1+ import React , { Component } from "react" ;
22import { Spin } from "antd" ;
3- const Loading = ( ) => {
4- return (
5- < div className = "app-container" >
6- < Spin />
7- </ div >
8- ) ;
9- } ;
3+ import NProgress from "nprogress" ; // progress bar
4+ import "nprogress/nprogress.css" ; // progress bar style
5+
6+ NProgress . configure ( { showSpinner : false } ) // NProgress Configuration
7+
8+ class Loading extends Component {
9+ componentDidMount ( ) {
10+ NProgress . start ( )
11+ }
12+ componentWillUnmount ( ) {
13+ NProgress . done ( )
14+ }
15+ render ( ) {
16+ return (
17+ < div className = "app-container" >
18+ < Spin />
19+ </ div >
20+ ) ;
21+ }
22+ }
1023
1124export default Loading ;
You can’t perform that action at this time.
0 commit comments