aboutsummaryrefslogtreecommitdiff
path: root/modern/src/GeofencePage.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/GeofencePage.js')
-rw-r--r--modern/src/GeofencePage.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/modern/src/GeofencePage.js b/modern/src/GeofencePage.js
index d421a8e1..89762b60 100644
--- a/modern/src/GeofencePage.js
+++ b/modern/src/GeofencePage.js
@@ -24,10 +24,11 @@ const GeofencePage = () => {
const [item, setItem] = useState();
+ const validate = () => item && item.name;
+
return (
- <EditItemView endpoint="geofences" item={item} setItem={setItem}>
- {item
- && (
+ <EditItemView endpoint="geofences" item={item} setItem={setItem} validate={validate}>
+ {item && (
<>
<Accordion defaultExpanded>
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
@@ -60,7 +61,7 @@ const GeofencePage = () => {
</AccordionDetails>
</Accordion>
</>
- )}
+ )}
</EditItemView>
);
};