Skip to content

Commit

Permalink
Add suspense. (ironmansoftware#1244)
Browse files Browse the repository at this point in the history
* Add suspense.

* Move suspense.
  • Loading branch information
adamdriscoll authored Oct 11, 2019
1 parent d38c97f commit ea93dcd
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/client/src/app/ud-dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -391,12 +391,14 @@ export default class UdDashboard extends React.Component {
/>
</header>,
<main style={{background: this.state.dashboard.backgroundColor, color: this.state.dashboard.fontColor}}>
<Switch>
{staticPages}
{dynamicPages}
<Route exact path={window.baseUrl + `/`} render={this.redirectToHomePage.bind(this)} />
<Route path={window.baseUrl + `/`} render={() => <NotFound/>} />
</Switch>
<Suspense fallback={<span/>}>
<Switch>
{staticPages}
{dynamicPages}
<Route exact path={window.baseUrl + `/`} render={this.redirectToHomePage.bind(this)} />
<Route path={window.baseUrl + `/`} render={() => <NotFound/>} />
</Switch>
</Suspense>
</main>,
<Suspense fallback={<div></div>}>
<UdModalComponent />
Expand Down

0 comments on commit ea93dcd

Please sign in to comment.