Add loader until page loads completely

This commit is contained in:
2021-10-03 15:59:24 +01:00
parent 90a31e8923
commit 80e7c24811
18 changed files with 280 additions and 147 deletions

View File

@@ -9,8 +9,6 @@ import "./css/GroupPage.css";
import "./css/ConfirmationDialog.css";
import "./css/OptionsListOverlay.css";
import Loader from "./puff-loader.svg"
export default withRouter(class GroupPage extends Component {
constructor(props) {
super(props);
@@ -118,9 +116,10 @@ export default withRouter(class GroupPage extends Component {
}
this.setState(newState);
this.props.page.load();
});
});
this.props.logEvent("select_content", {
content_type: "group",
item_id: this.props.match.params.groupId,
@@ -129,6 +128,7 @@ export default withRouter(class GroupPage extends Component {
componentWillUnmount() {
this.isMounted = false;
this.props.page.unload();
}
editGroupName = () => {
@@ -340,10 +340,7 @@ export default withRouter(class GroupPage extends Component {
<NavBar items={this.state.navbarItems} />
<main>
{
(this.state.role === null)
?
<img className="page-loader" src={Loader} alt="Loading..." />
:
!(this.state.role === null) &&
<>
<div className="page-header">
{