aboutsummaryrefslogtreecommitdiff
path: root/src/common/attributes/useGeofenceAttributes.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/attributes/useGeofenceAttributes.js')
-rw-r--r--src/common/attributes/useGeofenceAttributes.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/common/attributes/useGeofenceAttributes.js b/src/common/attributes/useGeofenceAttributes.js
new file mode 100644
index 00000000..a5cd068b
--- /dev/null
+++ b/src/common/attributes/useGeofenceAttributes.js
@@ -0,0 +1,18 @@
+import { useMemo } from 'react';
+
+export default (t) => useMemo(() => ({
+ color: {
+ name: t('attributeColor'),
+ type: 'string',
+ },
+ speedLimit: {
+ name: t('attributeSpeedLimit'),
+ type: 'number',
+ subtype: 'speed',
+ },
+ polylineDistance: {
+ name: t('attributePolylineDistance'),
+ type: 'number',
+ subtype: 'distance',
+ },
+}), [t]);