don't display external login panel on external login page
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
e731a38f6d
commit
ed81e73003
2 changed files with 52 additions and 1 deletions
|
@ -25,6 +25,7 @@ import DefaultPage from 'soapbox/pages/default-page';
|
|||
import EmptyPage from 'soapbox/pages/empty-page';
|
||||
import EventPage from 'soapbox/pages/event-page';
|
||||
import EventsPage from 'soapbox/pages/events-page';
|
||||
import ExternalLoginPage from 'soapbox/pages/external-login-page';
|
||||
import GroupPage from 'soapbox/pages/group-page';
|
||||
import GroupsPage from 'soapbox/pages/groups-page';
|
||||
import HomePage from 'soapbox/pages/home-page';
|
||||
|
@ -336,7 +337,7 @@ const SwitchingColumnsArea: React.FC<ISwitchingColumnsArea> = ({ children }) =>
|
|||
<WrappedRoute path='/signup' page={EmptyPage} component={RegistrationPage} publicRoute exact />
|
||||
)}
|
||||
|
||||
<WrappedRoute path='/login/external' page={DefaultPage} component={ExternalLogin} publicRoute exact />
|
||||
<WrappedRoute path='/login/external' page={ExternalLoginPage} component={ExternalLogin} publicRoute exact />
|
||||
<WrappedRoute path='/login/add' page={DefaultPage} component={LoginPage} publicRoute exact />
|
||||
<WrappedRoute path='/login' page={DefaultPage} component={LoginPage} publicRoute exact />
|
||||
<WrappedRoute path='/reset-password' page={DefaultPage} component={PasswordReset} publicRoute exact />
|
||||
|
|
50
src/pages/external-login-page.tsx
Normal file
50
src/pages/external-login-page.tsx
Normal file
|
@ -0,0 +1,50 @@
|
|||
import React from 'react';
|
||||
|
||||
import LinkFooter from 'soapbox/features/ui/components/link-footer';
|
||||
import {
|
||||
WhoToFollowPanel,
|
||||
TrendsPanel,
|
||||
SignUpPanel,
|
||||
CtaBanner,
|
||||
} from 'soapbox/features/ui/util/async-components';
|
||||
import { useAppSelector, useFeatures } from 'soapbox/hooks';
|
||||
import { isStandalone } from 'soapbox/utils/state';
|
||||
|
||||
import { Layout } from '../components/ui';
|
||||
|
||||
interface IExternalLoginPage {
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
const ExternalLoginPage: React.FC<IExternalLoginPage> = ({ children }) => {
|
||||
const me = useAppSelector(state => state.me);
|
||||
const features = useFeatures();
|
||||
const standalone = useAppSelector(isStandalone);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Layout.Main>
|
||||
{children}
|
||||
|
||||
{!me && (
|
||||
<CtaBanner />
|
||||
)}
|
||||
</Layout.Main>
|
||||
|
||||
<Layout.Aside>
|
||||
{!me && !standalone && (
|
||||
<SignUpPanel />
|
||||
)}
|
||||
{features.trends && (
|
||||
<TrendsPanel limit={5} />
|
||||
)}
|
||||
{me && features.suggestions && (
|
||||
<WhoToFollowPanel limit={3} />
|
||||
)}
|
||||
<LinkFooter key='link-footer' />
|
||||
</Layout.Aside>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export { ExternalLoginPage as default };
|
Loading…
Reference in a new issue