Fix standalone redirect

Fixes https://gitlab.com/soapbox-pub/soapbox/-/issues/1524
environments/review-fix-standa-8uvdtd/deployments/4008
Alex Gleason 2023-09-22 17:33:33 -05:00
rodzic 52f9339050
commit b8e8be714a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -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 />