From 3d0e9200c2327b7bfa1394241eca3b9efb6ef126 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 28 Apr 2022 18:57:50 -0500 Subject: [PATCH] Layout: standalone fixes --- app/soapbox/features/ui/index.tsx | 4 +++- app/soapbox/pages/default_page.tsx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/soapbox/features/ui/index.tsx b/app/soapbox/features/ui/index.tsx index 295da1afd..99fe59b12 100644 --- a/app/soapbox/features/ui/index.tsx +++ b/app/soapbox/features/ui/index.tsx @@ -28,6 +28,7 @@ import RemoteInstancePage from 'soapbox/pages/remote_instance_page'; import StatusPage from 'soapbox/pages/status_page'; import { getAccessToken } from 'soapbox/utils/auth'; import { getVapidKey } from 'soapbox/utils/auth'; +import { isStandalone } from 'soapbox/utils/state'; import { fetchFollowRequests } from '../../actions/accounts'; import { fetchReports, fetchUsers, fetchConfig } from '../../actions/admin'; @@ -346,6 +347,7 @@ const UI: React.FC = ({ children }) => { const dropdownMenuIsOpen = useAppSelector(state => state.dropdown_menu.get('openId') !== null); const accessToken = useAppSelector(state => getAccessToken(state)); const streamingUrl = useAppSelector(state => state.instance.urls.get('streaming_api')); + const standalone = useAppSelector(isStandalone); const handleDragEnter = (e: DragEvent) => { e.preventDefault(); @@ -651,7 +653,7 @@ const UI: React.FC = ({ children }) => { - + {!standalone && } diff --git a/app/soapbox/pages/default_page.tsx b/app/soapbox/pages/default_page.tsx index 21c9026f5..1bf2c2731 100644 --- a/app/soapbox/pages/default_page.tsx +++ b/app/soapbox/pages/default_page.tsx @@ -8,11 +8,13 @@ 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 ( @@ -22,7 +24,7 @@ const DefaultPage: React.FC = ({ children }) => { - {!me && ( + {!me && !standalone && ( {Component => }