-
Notifications
You must be signed in to change notification settings - Fork 516
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
20 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,24 @@ | ||
import React from "react"; | ||
import React, { Component } from "react"; | ||
import { Spin } from "antd"; | ||
import NProgress from "nprogress"; // progress bar | ||
import "nprogress/nprogress.css"; // progress bar style | ||
|
||
const Loading = () => { | ||
return ( | ||
<div className="app-container"> | ||
<Spin /> | ||
</div> | ||
); | ||
}; | ||
NProgress.configure({ showSpinner: false }); // NProgress Configuration | ||
|
||
class Loading extends Component { | ||
componentDidMount() { | ||
NProgress.start(); | ||
} | ||
componentWillUnmount() { | ||
NProgress.done(); | ||
} | ||
render() { | ||
return ( | ||
<div className="app-container"> | ||
<Spin /> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default Loading; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters