From 173fbd653550f34300d0f5e92093403818101320 Mon Sep 17 00:00:00 2001 From: Justin Date: Tue, 10 May 2022 06:17:14 -0400 Subject: [PATCH] Include CtaBanner in layouts --- app/soapbox/features/ui/util/async-components.ts | 4 ++++ app/soapbox/pages/default_page.tsx | 7 +++++++ app/soapbox/pages/home_page.tsx | 7 +++++++ app/soapbox/pages/profile_page.tsx | 7 +++++++ app/soapbox/pages/status_page.js | 7 +++++++ 5 files changed, 32 insertions(+) diff --git a/app/soapbox/features/ui/util/async-components.ts b/app/soapbox/features/ui/util/async-components.ts index 57658de0f..1e6b03706 100644 --- a/app/soapbox/features/ui/util/async-components.ts +++ b/app/soapbox/features/ui/util/async-components.ts @@ -346,6 +346,10 @@ export function SignUpPanel() { return import(/* webpackChunkName: "features/ui" */'../components/panels/sign-up-panel'); } +export function CtaBanner() { + return import(/* webpackChunkName: "features/ui" */'../components/cta-banner'); +} + export function FundingPanel() { return import(/* webpackChunkName: "features/ui" */'../components/funding_panel'); } diff --git a/app/soapbox/pages/default_page.tsx b/app/soapbox/pages/default_page.tsx index 21c9026f5..b64cf452d 100644 --- a/app/soapbox/pages/default_page.tsx +++ b/app/soapbox/pages/default_page.tsx @@ -6,6 +6,7 @@ import { WhoToFollowPanel, TrendsPanel, SignUpPanel, + CtaBanner, } from 'soapbox/features/ui/util/async-components'; import { useAppSelector, useFeatures } from 'soapbox/hooks'; @@ -19,6 +20,12 @@ const DefaultPage: React.FC = ({ children }) => { <> {children} + + {!me && ( + + {Component => } + + )} diff --git a/app/soapbox/pages/home_page.tsx b/app/soapbox/pages/home_page.tsx index 5c81ad901..643de6419 100644 --- a/app/soapbox/pages/home_page.tsx +++ b/app/soapbox/pages/home_page.tsx @@ -10,6 +10,7 @@ import { FundingPanel, CryptoDonatePanel, BirthdayPanel, + CtaBanner, } from 'soapbox/features/ui/util/async-components'; import { useAppSelector, useOwnAccount, useFeatures, useSoapboxConfig } from 'soapbox/hooks'; @@ -56,6 +57,12 @@ const HomePage: React.FC = ({ children }) => { )} {children} + + {!me && ( + + {Component => } + + )} diff --git a/app/soapbox/pages/profile_page.tsx b/app/soapbox/pages/profile_page.tsx index e1691e14b..c3cb65ff4 100644 --- a/app/soapbox/pages/profile_page.tsx +++ b/app/soapbox/pages/profile_page.tsx @@ -10,6 +10,7 @@ import { ProfileMediaPanel, ProfileFieldsPanel, SignUpPanel, + CtaBanner, } from 'soapbox/features/ui/util/async-components'; import { useAppSelector, useFeatures, useSoapboxConfig } from 'soapbox/hooks'; import { findAccountByUsername } from 'soapbox/selectors'; @@ -134,6 +135,12 @@ const ProfilePage: React.FC = ({ params, children }) => { {children} + + {!me && ( + + {Component => } + + )} diff --git a/app/soapbox/pages/status_page.js b/app/soapbox/pages/status_page.js index 302d1238a..e4ff9955e 100644 --- a/app/soapbox/pages/status_page.js +++ b/app/soapbox/pages/status_page.js @@ -7,6 +7,7 @@ import { WhoToFollowPanel, TrendsPanel, SignUpPanel, + CtaBanner, } from 'soapbox/features/ui/util/async-components'; // import GroupSidebarPanel from '../features/groups/sidebar_panel'; import { getFeatures } from 'soapbox/utils/features'; @@ -35,6 +36,12 @@ class StatusPage extends ImmutablePureComponent { <> {children} + + {!me && ( + + {Component => } + + )}