@@ -43,6 +45,15 @@ function DispatchTable (props) {
}
+ {
+ queueLength > 0 && (
+
+ {'+'}
+ {queueLength}
+ {' IN QUEUE'}
+
+ )
+ }
)
}
diff --git a/src/components/DispatchTable/DispatchTable.module.scss b/src/components/DispatchTable/DispatchTable.module.scss
index eab9d78c..ce80cac7 100644
--- a/src/components/DispatchTable/DispatchTable.module.scss
+++ b/src/components/DispatchTable/DispatchTable.module.scss
@@ -72,3 +72,14 @@
background-color: rgba(240, 230, 140, 0.25);
opacity: 0.25;
}
+
+
+.queueLength {
+ float: right;
+
+ padding: 2px 8px;
+
+ border: 1px solid var(--table-border-color);
+
+ background: $black;
+}
diff --git a/src/components/Switch/Switch.js b/src/components/Switch/Switch.js
index f9fef188..d97827ed 100644
--- a/src/components/Switch/Switch.js
+++ b/src/components/Switch/Switch.js
@@ -16,22 +16,22 @@ function Switch (props) {
disabled,
id,
label,
- onClick,
+ onChange,
...inputProps
} = props
const [loading, setLoading] = useState(false)
- const handleClick = useCallback(async (event) => {
+ const handleChange = useCallback(async (event) => {
if (!isAsync) {
- onClick?.(event)
+ onChange?.(event)
return
}
setLoading(true)
- await onClick?.(event)
+ await onChange?.(event)
setLoading(false)
- }, [isAsync, onClick])
+ }, [isAsync, onChange])
let icon = 'times'
if (loading) {
@@ -52,7 +52,7 @@ function Switch (props) {
disabled={loading || disabled}
id={id}
type="checkbox"
- onChange={handleClick} />
+ onChange={handleChange} />