aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/components/ProxyApp.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/js/components/ProxyApp.jsx')
-rw-r--r--web/src/js/components/ProxyApp.jsx21
1 files changed, 14 insertions, 7 deletions
diff --git a/web/src/js/components/ProxyApp.jsx b/web/src/js/components/ProxyApp.jsx
index 2962fc2b..f8a6e262 100644
--- a/web/src/js/components/ProxyApp.jsx
+++ b/web/src/js/components/ProxyApp.jsx
@@ -1,14 +1,11 @@
import React, { Component, PropTypes } from 'react'
-import ReactDOM from 'react-dom'
-import _ from 'lodash'
import { connect } from 'react-redux'
import { init as appInit, destruct as appDestruct } from '../ducks/app'
-import { onKeyDown } from '../ducks/ui'
+import { onKeyDown } from '../ducks/ui/keyboard'
import Header from './Header'
import EventLog from './EventLog'
import Footer from './Footer'
-import { Key } from '../utils.js'
class ProxyAppMain extends Component {
@@ -27,6 +24,15 @@ class ProxyAppMain extends Component {
}
componentWillReceiveProps(nextProps) {
+ /*
+ FIXME: improve react-router -> redux integration.
+ if (nextProps.location.query[Query.SEARCH] !== nextProps.filter) {
+ this.props.updateFilter(nextProps.location.query[Query.SEARCH], false)
+ }
+ if (nextProps.location.query[Query.HIGHLIGHT] !== nextProps.highlight) {
+ this.props.updateHighlight(nextProps.location.query[Query.HIGHLIGHT], false)
+ }
+ */
if (nextProps.query === this.props.query && nextProps.selectedFlowId === this.props.selectedFlowId && nextProps.panel === this.props.panel) {
return
}
@@ -35,13 +41,14 @@ class ProxyAppMain extends Component {
} else {
this.context.router.replace({ pathname: '/flows', query: nextProps.query })
}
+
}
render() {
const { showEventLog, location, children, query } = this.props
return (
<div id="container" tabIndex="0">
- <Header ref="header" query={query} />
+ <Header/>
{React.cloneElement(
children,
{ ref: 'view', location, query }
@@ -58,8 +65,8 @@ class ProxyAppMain extends Component {
export default connect(
state => ({
showEventLog: state.eventLog.visible,
- query: state.ui.query,
- panel: state.ui.panel,
+ query: state.flowView.filter,
+ panel: state.ui.flow.tab,
selectedFlowId: state.flows.selected[0]
}),
{