Include CtaBanner in layouts
This commit is contained in:
parent
a8142d9e2b
commit
173fbd6535
5 changed files with 32 additions and 0 deletions
|
@ -346,6 +346,10 @@ export function SignUpPanel() {
|
||||||
return import(/* webpackChunkName: "features/ui" */'../components/panels/sign-up-panel');
|
return import(/* webpackChunkName: "features/ui" */'../components/panels/sign-up-panel');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function CtaBanner() {
|
||||||
|
return import(/* webpackChunkName: "features/ui" */'../components/cta-banner');
|
||||||
|
}
|
||||||
|
|
||||||
export function FundingPanel() {
|
export function FundingPanel() {
|
||||||
return import(/* webpackChunkName: "features/ui" */'../components/funding_panel');
|
return import(/* webpackChunkName: "features/ui" */'../components/funding_panel');
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import {
|
||||||
WhoToFollowPanel,
|
WhoToFollowPanel,
|
||||||
TrendsPanel,
|
TrendsPanel,
|
||||||
SignUpPanel,
|
SignUpPanel,
|
||||||
|
CtaBanner,
|
||||||
} from 'soapbox/features/ui/util/async-components';
|
} from 'soapbox/features/ui/util/async-components';
|
||||||
import { useAppSelector, useFeatures } from 'soapbox/hooks';
|
import { useAppSelector, useFeatures } from 'soapbox/hooks';
|
||||||
|
|
||||||
|
@ -19,6 +20,12 @@ const DefaultPage: React.FC = ({ children }) => {
|
||||||
<>
|
<>
|
||||||
<Layout.Main>
|
<Layout.Main>
|
||||||
{children}
|
{children}
|
||||||
|
|
||||||
|
{!me && (
|
||||||
|
<BundleContainer fetchComponent={CtaBanner}>
|
||||||
|
{Component => <Component key='cta-banner' />}
|
||||||
|
</BundleContainer>
|
||||||
|
)}
|
||||||
</Layout.Main>
|
</Layout.Main>
|
||||||
|
|
||||||
<Layout.Aside>
|
<Layout.Aside>
|
||||||
|
|
|
@ -10,6 +10,7 @@ import {
|
||||||
FundingPanel,
|
FundingPanel,
|
||||||
CryptoDonatePanel,
|
CryptoDonatePanel,
|
||||||
BirthdayPanel,
|
BirthdayPanel,
|
||||||
|
CtaBanner,
|
||||||
} from 'soapbox/features/ui/util/async-components';
|
} from 'soapbox/features/ui/util/async-components';
|
||||||
import { useAppSelector, useOwnAccount, useFeatures, useSoapboxConfig } from 'soapbox/hooks';
|
import { useAppSelector, useOwnAccount, useFeatures, useSoapboxConfig } from 'soapbox/hooks';
|
||||||
|
|
||||||
|
@ -56,6 +57,12 @@ const HomePage: React.FC = ({ children }) => {
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{children}
|
{children}
|
||||||
|
|
||||||
|
{!me && (
|
||||||
|
<BundleContainer fetchComponent={CtaBanner}>
|
||||||
|
{Component => <Component key='cta-banner' />}
|
||||||
|
</BundleContainer>
|
||||||
|
)}
|
||||||
</Layout.Main>
|
</Layout.Main>
|
||||||
|
|
||||||
<Layout.Aside>
|
<Layout.Aside>
|
||||||
|
|
|
@ -10,6 +10,7 @@ import {
|
||||||
ProfileMediaPanel,
|
ProfileMediaPanel,
|
||||||
ProfileFieldsPanel,
|
ProfileFieldsPanel,
|
||||||
SignUpPanel,
|
SignUpPanel,
|
||||||
|
CtaBanner,
|
||||||
} from 'soapbox/features/ui/util/async-components';
|
} from 'soapbox/features/ui/util/async-components';
|
||||||
import { useAppSelector, useFeatures, useSoapboxConfig } from 'soapbox/hooks';
|
import { useAppSelector, useFeatures, useSoapboxConfig } from 'soapbox/hooks';
|
||||||
import { findAccountByUsername } from 'soapbox/selectors';
|
import { findAccountByUsername } from 'soapbox/selectors';
|
||||||
|
@ -134,6 +135,12 @@ const ProfilePage: React.FC<IProfilePage> = ({ params, children }) => {
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
</Column>
|
</Column>
|
||||||
|
|
||||||
|
{!me && (
|
||||||
|
<BundleContainer fetchComponent={CtaBanner}>
|
||||||
|
{Component => <Component key='cta-banner' />}
|
||||||
|
</BundleContainer>
|
||||||
|
)}
|
||||||
</Layout.Main>
|
</Layout.Main>
|
||||||
|
|
||||||
<Layout.Aside>
|
<Layout.Aside>
|
||||||
|
|
|
@ -7,6 +7,7 @@ import {
|
||||||
WhoToFollowPanel,
|
WhoToFollowPanel,
|
||||||
TrendsPanel,
|
TrendsPanel,
|
||||||
SignUpPanel,
|
SignUpPanel,
|
||||||
|
CtaBanner,
|
||||||
} from 'soapbox/features/ui/util/async-components';
|
} from 'soapbox/features/ui/util/async-components';
|
||||||
// import GroupSidebarPanel from '../features/groups/sidebar_panel';
|
// import GroupSidebarPanel from '../features/groups/sidebar_panel';
|
||||||
import { getFeatures } from 'soapbox/utils/features';
|
import { getFeatures } from 'soapbox/utils/features';
|
||||||
|
@ -35,6 +36,12 @@ class StatusPage extends ImmutablePureComponent {
|
||||||
<>
|
<>
|
||||||
<Layout.Main>
|
<Layout.Main>
|
||||||
{children}
|
{children}
|
||||||
|
|
||||||
|
{!me && (
|
||||||
|
<BundleContainer fetchComponent={CtaBanner}>
|
||||||
|
{Component => <Component key='cta-banner' />}
|
||||||
|
</BundleContainer>
|
||||||
|
)}
|
||||||
</Layout.Main>
|
</Layout.Main>
|
||||||
|
|
||||||
<Layout.Aside>
|
<Layout.Aside>
|
||||||
|
|
Loading…
Reference in a new issue