@ -1,12 +1,31 @@
import React from 'react' ;
import React from 'react' ;
import ImmutablePureComponent from 'react-immutable-pure-component' ;
import { NavLink , withRouter } from 'react-router-dom' ;
import { NavLink , withRouter } from 'react-router-dom' ;
import { FormattedMessage } from 'react-intl' ;
import { FormattedMessage } from 'react-intl' ;
import Icon from 'flavours/glitch/components/icon' ;
import Icon from 'flavours/glitch/components/icon' ;
import NotificationsCounterIcon from './notifications_counter_icon' ;
import NotificationsCounterIcon from './notifications_counter_icon' ;
import FollowRequestsNavLink from './follow_requests_nav_link' ;
import FollowRequestsNavLink from './follow_requests_nav_link' ;
import ListPanel from './list_panel' ;
import ListPanel from './list_panel' ;
import { openModal } from 'flavours/glitch/actions/modal' ;
import { connect } from 'react-redux' ;
const NavigationPanel = ( ) => (
const mapStateToProps = ( ) => { } ;
const mapDispatchToProps = dispatch => ( {
openSettings ( e ) {
e . preventDefault ( ) ;
e . stopPropagation ( ) ;
dispatch ( openModal ( 'SETTINGS' , { } ) ) ;
} ,
} ) ;
export default @ connect ( mapStateToProps , mapDispatchToProps )
@ withRouter
class NavigationPanel extends ImmutablePureComponent {
render ( ) {
const { openSettings } = this . props ;
return (
< div className = 'navigation-panel' >
< div className = 'navigation-panel' >
< NavLink className = 'column-link column-link--transparent' to = '/timelines/home' data - preview - title - id = 'column.home' data - preview - icon = 'home' > < Icon className = 'column-link__icon' icon = 'home' fixedWidth / > < FormattedMessage id = 'tabs_bar.home' defaultMessage = 'Home' / > < / N a v L i n k >
< NavLink className = 'column-link column-link--transparent' to = '/timelines/home' data - preview - title - id = 'column.home' data - preview - icon = 'home' > < Icon className = 'column-link__icon' icon = 'home' fixedWidth / > < FormattedMessage id = 'tabs_bar.home' defaultMessage = 'Home' / > < / N a v L i n k >
< NavLink className = 'column-link column-link--transparent' to = '/notifications' data - preview - title - id = 'column.notifications' data - preview - icon = 'bell' > < NotificationsCounterIcon className = 'column-link__icon' / > < FormattedMessage id = 'tabs_bar.notifications' defaultMessage = 'Notifications' / > < / N a v L i n k >
< NavLink className = 'column-link column-link--transparent' to = '/notifications' data - preview - title - id = 'column.notifications' data - preview - icon = 'bell' > < NotificationsCounterIcon className = 'column-link__icon' / > < FormattedMessage id = 'tabs_bar.notifications' defaultMessage = 'Notifications' / > < / N a v L i n k >
@ -22,9 +41,10 @@ const NavigationPanel = () => (
< hr / >
< hr / >
< a className = 'column-link column-link--transparent' href = '/settings/preferences' target = '_blank' > < Icon className = 'column-link__icon' icon = 'cog' fixedWidth / > < FormattedMessage id = 'navigation_bar.preferences' defaultMessage = 'Preferences' / > < / a >
< a className = 'column-link column-link--transparent' href = '/settings/preferences' target = '_blank' > < Icon className = 'column-link__icon' icon = 'cog' fixedWidth / > < FormattedMessage id = 'navigation_bar.preferences' defaultMessage = 'Preferences' / > < / a >
< a className = 'column-link column-link--transparent' href = '#' onClick = { openSettings } > < Icon className = 'column-link__icon' icon = 'cogs' fixedWidth / > < FormattedMessage id = 'navigation_bar.app_settings' defaultMessage = 'App settings' / > < / a >
< a className = 'column-link column-link--transparent' href = '/relationships' target = '_blank' > < Icon className = 'column-link__icon' icon = 'users' fixedWidth / > < FormattedMessage id = 'navigation_bar.follows_and_followers' defaultMessage = 'Follows and followers' / > < / a >
< a className = 'column-link column-link--transparent' href = '/relationships' target = '_blank' > < Icon className = 'column-link__icon' icon = 'users' fixedWidth / > < FormattedMessage id = 'navigation_bar.follows_and_followers' defaultMessage = 'Follows and followers' / > < / a >
< a className = 'column-link column-link--transparent' href = '/explore' > < Icon className = 'column-link__icon' icon = 'address-book-o' fixedWidth / > < FormattedMessage id = 'navigation_bar.profile_directory' defaultMessage = 'Profile directory' / > < / a >
< a className = 'column-link column-link--transparent' href = '/explore' > < Icon className = 'column-link__icon' icon = 'address-book-o' fixedWidth / > < FormattedMessage id = 'navigation_bar.profile_directory' defaultMessage = 'Profile directory' / > < / a >
< / d i v >
< / d i v >
) ;
) ;
} ;
export default withRouter ( NavigationPanel ) ;
} ;