import lbry from '../lbry.js'; import React from 'react'; import {Link} from './link.js'; var DrawerItem = React.createClass({ getDefaultProps: function() { return { subPages: [], }; }, render: function() { var isSelected = (this.props.viewingPage == this.props.href.substr(1) || this.props.subPages.indexOf(this.props.viewingPage) != -1); return } }); var drawerImageStyle = { //@TODO: remove this, img should be properly scaled once size is settled height: '36px' }; var Drawer = React.createClass({ _balanceSubscribeId: null, handleLogoClicked: function(event) { if ((event.ctrlKey || event.metaKey) && event.shiftKey) { window.location.href = '?developer' event.preventDefault(); } }, getInitialState: function() { return { balance: 0, }; }, componentDidMount: function() { this._balanceSubscribeId = lbry.balanceSubscribe((balance) => { this.setState({ balance: balance }); }); }, componentWillUnmount: function() { if (this._balanceSubscribeId) { lbry.balanceUnsubscribe(this._balanceSubscribeId) } }, render: function() { return ( ); } }); export default Drawer;