diff --git a/client/homebrew/navbar/navbar.jsx b/client/homebrew/navbar/navbar.jsx
index 0aeac86c5..ae4604598 100644
--- a/client/homebrew/navbar/navbar.jsx
+++ b/client/homebrew/navbar/navbar.jsx
@@ -1,25 +1,21 @@
-var React = require('react');
-var _ = require('lodash');
+const React = require('react');
+const _ = require('lodash');
-var Nav = require('naturalcrit/nav/nav.jsx');
+const Nav = require('naturalcrit/nav/nav.jsx');
-var Navbar = React.createClass({
- getDefaultProps: function() {
+const Navbar = React.createClass({
+ getInitialState: function() {
return {
+ showNonChromeWarning : false,
ver : '0.0.0'
};
},
- getInitialState: function() {
- return {
- showNonChromeWarning : false
- };
- },
-
componentDidMount: function() {
- var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
+ const isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
this.setState({
- showNonChromeWarning : !isChrome
+ showNonChromeWarning : !isChrome,
+ ver : window.version
})
},
@@ -40,7 +36,7 @@ var Navbar = React.createClass({
The Homebrewery
- {`v${this.props.ver}`}
+ {`v${this.state.ver}`}
{this.renderChromeWarning()}