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,7 +170,14 @@ const SoapboxMount = () => {
<ErrorBoundary> <ErrorBoundary>
<BrowserRouter basename={BuildConfig.FE_SUBDIRECTORY}> <BrowserRouter basename={BuildConfig.FE_SUBDIRECTORY}>
<ScrollContext shouldUpdateScroll={shouldUpdateScroll}> <ScrollContext shouldUpdateScroll={shouldUpdateScroll}>
<> <Switch>
<Route
path='/embed/:statusId'
render={(props) => <EmbeddedStatus params={props.match.params} />}
/>
<Redirect from='/@:username/:statusId/embed' to='/embed/:statusId' />
<Route>
{renderBody()} {renderBody()}
<BundleContainer fetchComponent={NotificationsContainer}> <BundleContainer fetchComponent={NotificationsContainer}>
@ -188,7 +189,8 @@ const SoapboxMount = () => {
</BundleContainer> </BundleContainer>
<GdprBanner /> <GdprBanner />
</> </Route>
</Switch>
</ScrollContext> </ScrollContext>
</BrowserRouter> </BrowserRouter>
</ErrorBoundary> </ErrorBoundary>