aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/components
diff options
context:
space:
mode:
authorMatthew Shao <me@matshao.com>2017-05-28 19:20:09 +0800
committerMatthew Shao <me@matshao.com>2017-05-28 19:20:09 +0800
commit9c90d13149ec2db5bbe6db3b076bf3da78e0cac9 (patch)
treebbd7040bcf058fab4ba3aadd91a1f0ffc7e37175 /web/src/js/components
parentfbaa842a462bbe8360d68b24eed9e7b2d7d3c7dc (diff)
downloadmitmproxy-9c90d13149ec2db5bbe6db3b076bf3da78e0cac9.tar.gz
mitmproxy-9c90d13149ec2db5bbe6db3b076bf3da78e0cac9.tar.bz2
mitmproxy-9c90d13149ec2db5bbe6db3b076bf3da78e0cac9.zip
[web] Add tests for js/components/Header/MainMenu.js
Diffstat (limited to 'web/src/js/components')
-rw-r--r--web/src/js/components/Header/MainMenu.jsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/web/src/js/components/Header/MainMenu.jsx b/web/src/js/components/Header/MainMenu.jsx
index 465649d7..162ed0f5 100644
--- a/web/src/js/components/Header/MainMenu.jsx
+++ b/web/src/js/components/Header/MainMenu.jsx
@@ -17,6 +17,10 @@ export default function MainMenu() {
)
}
+export function setIntercept(intercept) {
+ updateSettings({ intercept })
+}
+
const InterceptInput = connect(
state => ({
value: state.settings.intercept || '',
@@ -24,7 +28,7 @@ const InterceptInput = connect(
type: 'pause',
color: 'hsl(208, 56%, 53%)'
}),
- { onChange: intercept => updateSettings({ intercept }) }
+ { onChange: setIntercept }
)(FilterInput);
const FlowFilterInput = connect(