import React from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import ImmutablePropTypes from 'react-immutable-proptypes' import ImmutablePureComponent from 'react-immutable-pure-component' import { openPopover } from '../../actions/popover' import { changeSetting, saveSettings } from '../../actions/settings' import { openModal } from '../../actions/modal' import { me } from '../../initial_state' import { makeGetAccount } from '../../selectors' import { THEMES, DEFAULT_THEME, MODAL_COMPOSE, POPOVER_NAV_SETTINGS, MODAL_DECK_COLUMN_ADD, } from '../../constants' import Avatar from '../avatar' import BackButton from '../back_button' import Button from '../button' import Icon from '../icon' import NavigationBarButton from '../navigation_bar_button' import Divider from '../divider' class DeckSidebar extends ImmutablePureComponent { handleOnClickLightBulb = () => { let index = THEMES.findIndex((t) => t === this.props.theme) const nextIndex = (index === THEMES.length -1) ? 0 : index += 1 const newTheme = THEMES[nextIndex] this.props.onChange('theme', newTheme) } handleOnOpenNavSettingsPopover = () => { this.props.onOpenNavSettingsPopover(this.avatarNode) } handleOnOpenNewColumnModel = () => { this.props.onOpenNewColumnModal() } handleOnOpenComposeModal = () => { this.props.onOpenComposeModal() } scrollToItem = () => { } setAvatarNode = (c) => { this.avatarNode = c } render() { const { account, gabDeckOrder, logoDisabled } = this.props const isPro = !!account ? account.get('is_pro') : false return (