browser: Component attr names should not clash with redux state keys. (#3656)

fixes #270
master
Krishna Srinivas 8 years ago committed by Harshavardhana
parent b288eaddb3
commit 46743c7918
  1. 8
      browser/app/js/components/Browse.js
  2. 10
      browser/app/js/components/BrowserDropdown.js

@ -414,10 +414,10 @@ export default class Browse extends React.Component {
let freePercent = free * 100 / total
if (web.LoggedIn()) {
browserDropdownButton = <BrowserDropdown fullScreen={ this.fullScreen.bind(this) }
showAbout={ this.showAbout.bind(this) }
showSettings={ this.showSettings.bind(this) }
logout={ this.logout.bind(this) } />
browserDropdownButton = <BrowserDropdown fullScreenFunc={ this.fullScreen.bind(this) }
aboutFunc={ this.showAbout.bind(this) }
settingsFunc={ this.showSettings.bind(this) }
logoutFunc={ this.logout.bind(this) } />
} else {
loginButton = <a className='btn btn-danger' href='/minio/login'>Login</a>
}

@ -18,7 +18,7 @@ import React from 'react'
import connect from 'react-redux/lib/components/connect'
import Dropdown from 'react-bootstrap/lib/Dropdown'
let BrowserDropdown = ({fullScreen, showAbout, showSettings, logout}) => {
let BrowserDropdown = ({fullScreenFunc, aboutFunc, settingsFunc, logoutFunc}) => {
return (
<li>
<Dropdown pullRight id="top-right-menu">
@ -30,7 +30,7 @@ let BrowserDropdown = ({fullScreen, showAbout, showSettings, logout}) => {
<a target="_blank" href="https://github.com/minio/miniobrowser">Github <i className="fa fa-github"></i></a>
</li>
<li>
<a href="" onClick={ fullScreen }>Fullscreen <i className="fa fa-expand"></i></a>
<a href="" onClick={ fullScreenFunc }>Fullscreen <i className="fa fa-expand"></i></a>
</li>
<li>
<a target="_blank" href="https://docs.minio.io/">Documentation <i className="fa fa-book"></i></a>
@ -39,13 +39,13 @@ let BrowserDropdown = ({fullScreen, showAbout, showSettings, logout}) => {
<a target="_blank" href="https://slack.minio.io">Ask for help <i className="fa fa-question-circle"></i></a>
</li>
<li>
<a href="" onClick={ showAbout }>About <i className="fa fa-info-circle"></i></a>
<a href="" onClick={ aboutFunc }>About <i className="fa fa-info-circle"></i></a>
</li>
<li>
<a href="" onClick={ showSettings }>Settings <i className="fa fa-cog"></i></a>
<a href="" onClick={ settingsFunc }>Settings <i className="fa fa-cog"></i></a>
</li>
<li>
<a href="" onClick={ logout }>Sign Out <i className="fa fa-sign-out"></i></a>
<a href="" onClick={ logoutFunc }>Sign Out <i className="fa fa-sign-out"></i></a>
</li>
</Dropdown.Menu>
</Dropdown>

Loading…
Cancel
Save