aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/components/common
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/js/components/common')
-rw-r--r--web/src/js/components/common/Button.jsx2
-rw-r--r--web/src/js/components/common/HideInStatic.jsx5
2 files changed, 6 insertions, 1 deletions
diff --git a/web/src/js/components/common/Button.jsx b/web/src/js/components/common/Button.jsx
index e02ae010..02dab305 100644
--- a/web/src/js/components/common/Button.jsx
+++ b/web/src/js/components/common/Button.jsx
@@ -12,7 +12,7 @@ Button.propTypes = {
export default function Button({ onClick, children, icon, disabled, className, title }) {
return (
<div className={classnames(className, 'btn btn-default')}
- onClick={!disabled && onClick}
+ onClick={disabled ? undefined : onClick}
disabled={disabled}
title={title}>
{icon && (<i className={"fa fa-fw " + icon}/> )}
diff --git a/web/src/js/components/common/HideInStatic.jsx b/web/src/js/components/common/HideInStatic.jsx
new file mode 100644
index 00000000..c5f3bf47
--- /dev/null
+++ b/web/src/js/components/common/HideInStatic.jsx
@@ -0,0 +1,5 @@
+import React from 'react'
+
+export default function HideInStatic({ children }) {
+ return global.MITMWEB_STATIC ? null : [children]
+}