diff options
Diffstat (limited to 'web/src/js/components/footer.js')
-rw-r--r-- | web/src/js/components/footer.js | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/web/src/js/components/footer.js b/web/src/js/components/footer.js index 415c2577..e2d96288 100644 --- a/web/src/js/components/footer.js +++ b/web/src/js/components/footer.js @@ -1,19 +1,20 @@ import React from "react"; import {SettingsState} from "./common.js"; -var Footer = React.createClass({ - mixins: [SettingsState], - render: function () { - var mode = this.state.settings.mode; - var intercept = this.state.settings.intercept; - return ( - <footer> - {mode && mode != "regular" ? <span className="label label-success">{mode} mode</span> : null} - - {intercept ? <span className="label label-success">Intercept: {intercept}</span> : null} - </footer> - ); - } -}); +Footer.propTypes = { + settings: React.PropTypes.object.isRequired, +}; -export default Footer;
\ No newline at end of file +export default function Footer({ settings }) { + const {mode, intercept} = settings; + return ( + <footer> + {mode && mode != "regular" && ( + <span className="label label-success">{mode} mode</span> + )} + {intercept && ( + <span className="label label-success">Intercept: {intercept}</span> + )} + </footer> + ); +} |