diff --git a/packages/pl-fe/src/components/sidebar-menu.tsx b/packages/pl-fe/src/components/sidebar-menu.tsx index a01e62124..f3361384a 100644 --- a/packages/pl-fe/src/components/sidebar-menu.tsx +++ b/packages/pl-fe/src/components/sidebar-menu.tsx @@ -11,10 +11,9 @@ import { useAccount } from 'pl-fe/api/hooks'; import Account from 'pl-fe/components/account'; import { Stack, Divider, HStack, Icon, Text } from 'pl-fe/components/ui'; import ProfileStats from 'pl-fe/features/ui/components/profile-stats'; -import { useAppDispatch, useAppSelector, useFeatures, useInstance } from 'pl-fe/hooks'; +import { useAppDispatch, useAppSelector, useFeatures, useInstance, useRegistrationStatus } from 'pl-fe/hooks'; import { makeGetOtherAccounts } from 'pl-fe/selectors'; import sourceCode from 'pl-fe/utils/code'; -import { isStandalone } from 'pl-fe/utils/state'; import type { List as ImmutableList } from 'immutable'; import type { Account as AccountEntity } from 'pl-fe/normalizers'; @@ -94,7 +93,7 @@ const SidebarMenu: React.FC = (): JSX.Element | null => { const [sidebarVisible, setSidebarVisible] = useState(sidebarOpen); const touchStart = useRef(0); const touchEnd = useRef(null); - const standalone = useAppSelector(isStandalone); + const { isOpen } = useRegistrationStatus(); const instance = useInstance(); const restrictUnauth = instance.pleroma.metadata.restrict_unauthenticated; @@ -451,7 +450,7 @@ const SidebarMenu: React.FC = (): JSX.Element | null => { onClick={onClose} /> - {!standalone && ( + {isOpen && ( { const features = useFeatures(); const { isDeveloper } = useSettings(); const { account } = useOwnAccount(); + const { isOpen } = useRegistrationStatus(); const notificationCount = useAppSelector((state) => state.notifications.unread); const followRequestsCount = useAppSelector((state) => state.user_lists.follow_requests.items.count()); @@ -280,11 +281,11 @@ const SidebarNavigation = () => { text={} /> - } - /> + />} )}