ExternalLogin: move to AuthLayout instead of UI

This commit is contained in:
Alex Gleason 2022-05-07 11:52:56 -05:00
parent 4d898e1075
commit dd4f41f246
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
4 changed files with 4 additions and 6 deletions

View file

@ -185,7 +185,7 @@ const SoapboxMount = () => {
<Route exact path='/about/:slug?' component={PublicLayout} />
<Route exact path='/beta/:slug?' component={PublicLayout} />
<Route exact path='/mobile/:slug?' component={PublicLayout} />
<Route exact path='/login' component={AuthLayout} />
<Route path='/login' component={AuthLayout} />
{(features.accountCreation && instance.registrations) && (
<Route exact path='/signup' component={AuthLayout} />
)}

View file

@ -11,6 +11,7 @@ import LoginPage from '../auth_login/components/login_page';
import PasswordReset from '../auth_login/components/password_reset';
import PasswordResetConfirm from '../auth_login/components/password_reset_confirm';
import RegistrationForm from '../auth_login/components/registration_form';
import ExternalLoginForm from '../external_login/components/external-login-form';
import Verification from '../verification';
import EmailPassthru from '../verification/email_passthru';
@ -44,6 +45,7 @@ const AuthLayout = () => {
<Switch>
<Route exact path='/verify' component={Verification} />
<Route exact path='/verify/email/:token' component={EmailPassthru} />
<Route exact path='/login/external' component={ExternalLoginForm} />
<Route exact path='/login' component={LoginPage} />
<Route exact path='/signup' component={RegistrationForm} />
<Route exact path='/reset-password' component={PasswordReset} />

View file

@ -76,7 +76,6 @@ import {
// GroupRemovedAccounts,
// GroupCreate,
// GroupEdit,
ExternalLogin,
Settings,
MediaDisplay,
EditProfile,
@ -173,7 +172,6 @@ const SwitchingColumnsArea: React.FC = ({ children }) => {
// Ex: use /login instead of /auth, but redirect /auth to /login
return (
<Switch>
<WrappedRoute path='/login/external' page={EmptyPage} component={ExternalLogin} content={children} publicRoute exact />
<WrappedRoute path='/email-confirmation' page={EmptyPage} component={EmailConfirmation} publicRoute exact />
<WrappedRoute path='/logout' page={EmptyPage} component={LogoutPage} publicRoute exact />

View file

@ -8,13 +8,11 @@ import {
SignUpPanel,
} from 'soapbox/features/ui/util/async-components';
import { useAppSelector, useFeatures } from 'soapbox/hooks';
import { isStandalone } from 'soapbox/utils/state';
import { Layout } from '../components/ui';
const DefaultPage: React.FC = ({ children }) => {
const me = useAppSelector(state => state.me);
const standalone = useAppSelector(isStandalone);
const features = useFeatures();
return (
@ -24,7 +22,7 @@ const DefaultPage: React.FC = ({ children }) => {
</Layout.Main>
<Layout.Aside>
{!me && !standalone && (
{!me && (
<BundleContainer fetchComponent={SignUpPanel}>
{Component => <Component key='sign-up-panel' />}
</BundleContainer>