SoapboxMount: add Suspense boundaries

This commit is contained in:
Alex Gleason 2023-10-07 22:48:42 -05:00
parent 82da3cdae2
commit 82ea3e60a7
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -76,15 +76,24 @@ const SoapboxMount = () => {
<Switch> <Switch>
<Route <Route
path='/embed/:statusId' 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' /> <Redirect from='/@:username/:statusId/embed' to='/embed/:statusId' />
<Route> <Route>
{renderBody()} {renderBody()}
<ModalContainer /> <Suspense>
<GdprBanner /> <ModalContainer />
</Suspense>
<Suspense>
<GdprBanner />
</Suspense>
<div id='toaster'> <div id='toaster'>
<Toaster <Toaster