// Package imports. import PropTypes from 'prop-types'; import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { defineMessages } from 'react-intl'; import { Link } from 'react-router-dom'; // Components. import Icon from 'flavours/glitch/components/icon'; // Utils. import { conditionalRender } from 'flavours/glitch/util/react_helpers'; // Messages. const messages = defineMessages({ community: { defaultMessage: 'Local timeline', id: 'navigation_bar.community_timeline', }, home_timeline: { defaultMessage: 'Home', id: 'tabs_bar.home', }, logout: { defaultMessage: 'Logout', id: 'navigation_bar.logout', }, notifications: { defaultMessage: 'Notifications', id: 'tabs_bar.notifications', }, public: { defaultMessage: 'Federated timeline', id: 'navigation_bar.public_timeline', }, settings: { defaultMessage: 'App settings', id: 'navigation_bar.app_settings', }, start: { defaultMessage: 'Getting started', id: 'getting_started.heading', }, }); // The component. export default function DrawerHeader ({ columns, intl, onSettingsClick, }) { // Only renders the component if the column isn't being shown. const renderForColumn = conditionalRender.bind(null, columnId => !columns || !columns.some( column => column.get('id') === columnId ) ); // The result. return ( ); } // Props. DrawerHeader.propTypes = { columns: ImmutablePropTypes.list, intl: PropTypes.object, onSettingsClick: PropTypes.func, };