Merge branch 'navbar-standalone' into 'main'

Navbar: hide login form in standalone mode

See merge request soapbox-pub/soapbox!3019
environments/review-main-yi2y9f/deployments/4605
Alex Gleason 2024-05-12 21:17:33 +00:00
commit c6c6572f78
1 zmienionych plików z 81 dodań i 77 usunięć

Wyświetl plik

@ -10,7 +10,8 @@ import { openSidebar } from 'soapbox/actions/sidebar';
import SiteLogo from 'soapbox/components/site-logo';
import { Avatar, Button, Form, HStack, IconButton, Input, Tooltip } from 'soapbox/components/ui';
import Search from 'soapbox/features/compose/components/search';
import { useAppDispatch, useFeatures, useOwnAccount, useRegistrationStatus } from 'soapbox/hooks';
import { useAppDispatch, useAppSelector, useFeatures, useOwnAccount, useRegistrationStatus } from 'soapbox/hooks';
import { isStandalone } from 'soapbox/utils/state';
import ProfileDropdown from './profile-dropdown';
@ -28,6 +29,7 @@ const Navbar = () => {
const dispatch = useAppDispatch();
const intl = useIntl();
const features = useFeatures();
const standalone = useAppSelector(isStandalone);
const { isOpen } = useRegistrationStatus();
const { account } = useOwnAccount();
const node = useRef(null);
@ -103,6 +105,7 @@ const Navbar = () => {
)}
</HStack>
{!standalone && (
<HStack space={3} alignItems='center' className='absolute inset-y-0 right-0 pr-2 lg:static lg:inset-auto lg:ml-6 lg:pr-0'>
{account ? (
<div className='relative hidden items-center lg:flex'>
@ -180,6 +183,7 @@ const Navbar = () => {
</>
)}
</HStack>
)}
</div>
</div>
</nav>