diff --git a/src/init/soapbox-mount.tsx b/src/init/soapbox-mount.tsx index ed7f70c47..db210c8fa 100644 --- a/src/init/soapbox-mount.tsx +++ b/src/init/soapbox-mount.tsx @@ -41,39 +41,16 @@ const SoapboxMount = () => { return !(location.state?.soapboxModalKey && location.state?.soapboxModalKey !== prevRouterProps?.location?.state?.soapboxModalKey); }; - /** Render the onboarding flow. */ - const renderOnboarding = () => ( - }> - - - ); - - /** Render the auth layout or UI. */ - const renderSwitch = () => ( - - {(!me && redirectRootNoLogin) && ( - - )} - - - - ); - - /** Render the onboarding flow or UI. */ - const renderBody = () => { - if (showOnboarding) { - return renderOnboarding(); - } else { - return renderSwitch(); - } - }; - return ( + {(!me && redirectRootNoLogin) && ( + + )} + ( @@ -82,10 +59,16 @@ const SoapboxMount = () => { )} /> + - {renderBody()} + }> + {showOnboarding + ? + : + } +