import PropTypes from 'prop-types'; import React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link, NavLink } from 'react-router-dom'; import Icon from 'flavours/glitch/components/icon'; import TrendsContainer from 'flavours/glitch/features/getting_started/containers/trends_container'; import { showTrends, timelinePreview } from 'flavours/glitch/initial_state'; import FollowRequestsNavLink from './follow_requests_nav_link'; import ListPanel from './list_panel'; import NotificationsCounterIcon from './notifications_counter_icon'; import SignInBanner from './sign_in_banner'; import { preferencesLink, relationshipsLink } from 'flavours/glitch/utils/backend_links'; export default class NavigationPanel extends React.Component { static contextTypes = { router: PropTypes.object.isRequired, identity: PropTypes.object.isRequired, }; static propTypes = { onOpenSettings: PropTypes.func, }; render() { const { signedIn } = this.context.identity; const { onOpenSettings } = this.props; return (
{signedIn && ( )} {signedIn || timelinePreview && ( <> )} {!signedIn && (

)} {signedIn && (
{!!preferencesLink && } {!!relationshipsLink && }
)}

{showTrends && (
)}
); } }