Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
remove unused props in navigationBar
Browse files Browse the repository at this point in the history
  • Loading branch information
cezaraugusto authored and Suguru Hirahara committed Jul 12, 2017
1 parent 0d5d4fd commit ab59b14
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions app/renderer/components/navigation/navigationBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const ipc = require('electron').ipcRenderer
const ReduxComponent = require('../reduxComponent')
const UrlBar = require('./urlBar')
const AddEditBookmarkHanger = require('../bookmarks/addEditBookmarkHanger')
const {NormalizedButton} = require('../common/browserButton')
const NavigationBarButtonContainer = require('./buttons/navigationBarButtonContainer')

// Components -> buttons
Expand All @@ -29,14 +28,14 @@ const settings = require('../../../../js/constants/settings')

// State
const tabState = require('../../../common/state/tabState')
const menuBarState = require('../../../common/state/menuBarState')
const publisherState = require('../../../common/lib/publisherUtil')
const frameStateUtil = require('../../../../js/state/frameStateUtil')

// Utils
const cx = require('../../../../js/lib/classSet')
const {getBaseUrl} = require('../../../../js/lib/appUrlUtil')
const siteUtil = require('../../../../js/state/siteUtil')
const eventUtil = require('../../../../js/lib/eventUtil')
const {getSetting} = require('../../../../js/settings')
const {isDarwin} = require('../../../common/lib/platformUtil')
const {isFullScreen} = require('../../currentWindow')
Expand Down Expand Up @@ -97,7 +96,7 @@ class NavigationBar extends React.Component {
props.titleMode = titleMode
props.isBookmarked = activeFrameKey !== undefined &&
activeTab && activeTab.get('bookmarked')
props.isWideUrlBarEnabled = getSetting(settings.WIDE_URL_BAR)
props.isWideURLbarEnabled = getSetting(settings.WIDE_URL_BAR)
props.showBookmarkHanger = bookmarkDetail.get('isBookmarkHanger')
props.isLoading = loading
props.showPublisherToggle = publisherState.shouldShowAddPublisherButton(state, location, publisherId)
Expand All @@ -110,6 +109,15 @@ class NavigationBar extends React.Component {
props.bookmarkKey = siteUtil.getSiteKey(activeFrame)
props.showHomeButton = !props.titleMode && getSetting(settings.SHOW_HOME_BUTTON)

props.location = location
props.isDarwin = isDarwin()
props.isFullScreen = isFullScreen()
props.bookmarkDetail = bookmarkDetail
props.menubarVisible = menuBarState.isMenuBarVisible(currentWindow)
props.siteSettings = state.get('siteSettings')
props.synopsis = state.getIn(['publisherInfo', 'synopsis']) || new Immutable.Map()
props.locationInfo = state.get('locationInfo')

return props
}

Expand All @@ -123,7 +131,7 @@ class NavigationBar extends React.Component {
data-frame-key={this.props.activeFrameKey}
className={cx({
titleMode: this.props.titleMode,
[css(styles.navigationBar, (this.props.isDarwin && this.props.isFullScreen) && styles.navigationBar_isDarwin_isFullScreen, this.props.titleMode && styles.navigationBar_titleMode, this.props.isWideUrlBarEnabled && styles.navigationBar_wide)]: true
[css(styles.navigationBar, (this.props.isDarwin && this.props.isFullScreen) && styles.navigationBar_isDarwin_isFullScreen, this.props.titleMode && styles.navigationBar_titleMode, this.props.isWideURLbarEnabled && styles.navigationBar_wide)]: true
})}>
{
this.props.showBookmarkHanger
Expand Down

0 comments on commit ab59b14

Please sign in to comment.