Embeds: render embeds before anything else

This commit is contained in:
Alex Gleason 2022-08-25 20:32:18 -05:00
parent 5ad4303c3e
commit 5a6dcf0c4d
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -149,12 +149,6 @@ const SoapboxMount = () => {
<Route path='/verify' component={AuthLayout} /> <Route path='/verify' component={AuthLayout} />
)} )}
<Route
path='/embed/:statusId'
render={(props) => <EmbeddedStatus params={props.match.params} />}
/>
<Redirect from='/@:username/:statusId/embed' to='/embed/:statusId' />
<Route path='/reset-password' component={AuthLayout} /> <Route path='/reset-password' component={AuthLayout} />
<Route path='/edit-password' component={AuthLayout} /> <Route path='/edit-password' component={AuthLayout} />
<Route path='/invite/:token' component={AuthLayout} /> <Route path='/invite/:token' component={AuthLayout} />
@ -176,19 +170,27 @@ const SoapboxMount = () => {
<ErrorBoundary> <ErrorBoundary>
<BrowserRouter basename={BuildConfig.FE_SUBDIRECTORY}> <BrowserRouter basename={BuildConfig.FE_SUBDIRECTORY}>
<ScrollContext shouldUpdateScroll={shouldUpdateScroll}> <ScrollContext shouldUpdateScroll={shouldUpdateScroll}>
<> <Switch>
{renderBody()} <Route
path='/embed/:statusId'
render={(props) => <EmbeddedStatus params={props.match.params} />}
/>
<Redirect from='/@:username/:statusId/embed' to='/embed/:statusId' />
<BundleContainer fetchComponent={NotificationsContainer}> <Route>
{(Component) => <Component />} {renderBody()}
</BundleContainer>
<BundleContainer fetchComponent={ModalContainer}> <BundleContainer fetchComponent={NotificationsContainer}>
{Component => <Component />} {(Component) => <Component />}
</BundleContainer> </BundleContainer>
<GdprBanner /> <BundleContainer fetchComponent={ModalContainer}>
</> {Component => <Component />}
</BundleContainer>
<GdprBanner />
</Route>
</Switch>
</ScrollContext> </ScrollContext>
</BrowserRouter> </BrowserRouter>
</ErrorBoundary> </ErrorBoundary>