SoapboxMount: add Suspense boundaries
This commit is contained in:
parent
82da3cdae2
commit
82ea3e60a7
1 changed files with 12 additions and 3 deletions
|
@ -76,15 +76,24 @@ const SoapboxMount = () => {
|
|||
<Switch>
|
||||
<Route
|
||||
path='/embed/:statusId'
|
||||
render={(props) => <EmbeddedStatus params={props.match.params} />}
|
||||
render={(props) => (
|
||||
<Suspense>
|
||||
<EmbeddedStatus params={props.match.params} />
|
||||
</Suspense>
|
||||
)}
|
||||
/>
|
||||
<Redirect from='/@:username/:statusId/embed' to='/embed/:statusId' />
|
||||
|
||||
<Route>
|
||||
{renderBody()}
|
||||
|
||||
<ModalContainer />
|
||||
<GdprBanner />
|
||||
<Suspense>
|
||||
<ModalContainer />
|
||||
</Suspense>
|
||||
|
||||
<Suspense>
|
||||
<GdprBanner />
|
||||
</Suspense>
|
||||
|
||||
<div id='toaster'>
|
||||
<Toaster
|
||||
|
|
Loading…
Reference in a new issue