Merge branch 'fix-standalone' into 'main'

Fix standalone redirect

Closes #1524

See merge request soapbox-pub/soapbox!2740
This commit is contained in:
Alex Gleason 2023-09-22 22:49:33 +00:00
commit f8524e88f1

View file

@ -166,6 +166,7 @@ const SwitchingColumnsArea: React.FC<ISwitchingColumnsArea> = ({ children }) =>
const features = useFeatures();
const { search } = useLocation();
const { isLoggedIn } = useLoggedIn();
const standalone = useAppSelector(isStandalone);
const { authenticatedProfile, cryptoAddresses } = useSoapboxConfig();
const hasCrypto = cryptoAddresses.size > 0;
@ -177,6 +178,8 @@ const SwitchingColumnsArea: React.FC<ISwitchingColumnsArea> = ({ children }) =>
// Ex: use /login instead of /auth, but redirect /auth to /login
return (
<Switch>
{standalone && <Redirect from='/' to='/login/external' exact />}
<WrappedRoute path='/email-confirmation' page={EmptyPage} component={EmailConfirmation} publicRoute exact />
<WrappedRoute path='/logout' page={EmptyPage} component={LogoutPage} publicRoute exact />