couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From millayr <...@git.apache.org>
Subject [GitHub] couchdb-fauxton pull request #883: Navbar refactor
Date Tue, 28 Mar 2017 18:25:37 GMT
Github user millayr commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/883#discussion_r108499467
  
    --- Diff: app/addons/fauxton/appwrapper.js ---
    @@ -49,27 +53,52 @@ class ContentWrapper extends React.Component {
       }
     }
     
    -const App = ({router}) => {
    -  return (
    -    <div>
    -      <PermanentNotification />
    -      <div id="notifications">
    -        <NotificationController />
    -      </div>
    -      <div role="main" id="main">
    -        <div id="app-container">
    -          <div className="wrapper">
    -            <div className="pusher">
    -              <ContentWrapper router={router} />
    -            </div>
    -            <div id="primary-navbar">
    -              <NavBar/>
    +class App extends React.Component {
    +  constructor (props) {
    +    super(props);
    +    this.state = this.getStoreState();
    +  }
    +
    +  getStoreState () {
    +    return {
    +      isPrimaryNavMinimized: navBarStore.isMinimized()
    +    };
    +  }
    +
    +  componentDidMount () {
    +    navBarStore.on('change', this.onChange, this);
    +  }
    +
    +  onChange () {
    +    this.setState(this.getStoreState());
    +  }
    +
    +  render () {
    +    const mainClass = classNames(
    --- End diff --
    
    thanks :D


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message