Fix standalone redirect
Fixes https://gitlab.com/soapbox-pub/soapbox/-/issues/1524
This commit is contained in:
parent
52f9339050
commit
b8e8be714a
1 changed files with 3 additions and 0 deletions
|
@ -166,6 +166,7 @@ const SwitchingColumnsArea: React.FC<ISwitchingColumnsArea> = ({ children }) =>
|
||||||
const features = useFeatures();
|
const features = useFeatures();
|
||||||
const { search } = useLocation();
|
const { search } = useLocation();
|
||||||
const { isLoggedIn } = useLoggedIn();
|
const { isLoggedIn } = useLoggedIn();
|
||||||
|
const standalone = useAppSelector(isStandalone);
|
||||||
|
|
||||||
const { authenticatedProfile, cryptoAddresses } = useSoapboxConfig();
|
const { authenticatedProfile, cryptoAddresses } = useSoapboxConfig();
|
||||||
const hasCrypto = cryptoAddresses.size > 0;
|
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
|
// Ex: use /login instead of /auth, but redirect /auth to /login
|
||||||
return (
|
return (
|
||||||
<Switch>
|
<Switch>
|
||||||
|
{standalone && <Redirect from='/' to='/login/external' exact />}
|
||||||
|
|
||||||
<WrappedRoute path='/email-confirmation' page={EmptyPage} component={EmailConfirmation} publicRoute exact />
|
<WrappedRoute path='/email-confirmation' page={EmptyPage} component={EmailConfirmation} publicRoute exact />
|
||||||
<WrappedRoute path='/logout' page={EmptyPage} component={LogoutPage} publicRoute exact />
|
<WrappedRoute path='/logout' page={EmptyPage} component={LogoutPage} publicRoute exact />
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue