import classNames from 'classnames'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { useDispatch } from 'react-redux'; import { Link } from 'react-router-dom'; import { getSettings } from 'soapbox/actions/settings'; import { getSoapboxConfig } from 'soapbox/actions/soapbox'; import { Avatar, Button, Icon } from 'soapbox/components/ui'; import Search from 'soapbox/features/compose/components/search'; import { useAppSelector } from 'soapbox/hooks'; import { openSidebar } from '../../../actions/sidebar'; import ProfileDropdown from './profile-dropdown'; const Navbar = () => { const dispatch = useDispatch(); const node = React.useRef(null); const me = useAppSelector((state) => state.me); const account = useAppSelector((state) => state.accounts.get(me)); const settings = useAppSelector((state) => getSettings(state)); const soapboxConfig = useAppSelector((state) => getSoapboxConfig(state)); const singleUserMode = soapboxConfig.get('singleUserMode'); // In demo mode, use the Soapbox logo const logo = settings.get('demo') ? require('images/soapbox-logo.svg') : soapboxConfig.get('logo'); const onOpenSidebar = () => dispatch(openSidebar()); return ( ); }; export default Navbar;