aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/components/common/HideInStatic.jsx
diff options
context:
space:
mode:
authorMatthew Shao <me@matshao.com>2017-08-07 11:05:02 +0800
committerMatthew Shao <me@matshao.com>2017-08-07 11:05:02 +0800
commitf7b494ccf2a90d8c54df760e5142f34f11f8cf3c (patch)
tree9e70578680357bffc89c2bfb48ae978876d6d222 /web/src/js/components/common/HideInStatic.jsx
parent94a0b82ceedf1847a9bc67a6338369583f8410f9 (diff)
downloadmitmproxy-f7b494ccf2a90d8c54df760e5142f34f11f8cf3c.tar.gz
mitmproxy-f7b494ccf2a90d8c54df760e5142f34f11f8cf3c.tar.bz2
mitmproxy-f7b494ccf2a90d8c54df760e5142f34f11f8cf3c.zip
[web] Add HideInStatic Component
HideInStaic compoent will check the MITMWEB_STATIC var, and hide the responsive components in static mode.
Diffstat (limited to 'web/src/js/components/common/HideInStatic.jsx')
-rw-r--r--web/src/js/components/common/HideInStatic.jsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/web/src/js/components/common/HideInStatic.jsx b/web/src/js/components/common/HideInStatic.jsx
new file mode 100644
index 00000000..9f515c97
--- /dev/null
+++ b/web/src/js/components/common/HideInStatic.jsx
@@ -0,0 +1,5 @@
+import React from 'react'
+
+export default function HideInStatic({className, children }) {
+ return MITMWEB_STATIC ? null : ( <div className={className}>{children}</div> )
+}