aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings/CalendarPage.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/settings/CalendarPage.js')
-rw-r--r--modern/src/settings/CalendarPage.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/modern/src/settings/CalendarPage.js b/modern/src/settings/CalendarPage.js
index 60d4ef76..0d35d2f3 100644
--- a/modern/src/settings/CalendarPage.js
+++ b/modern/src/settings/CalendarPage.js
@@ -34,10 +34,11 @@ const CalendarPage = () => {
}
};
+ const validate = () => item && item.name && item.data;
+
return (
- <EditItemView endpoint="calendars" item={item} setItem={setItem}>
- {item
- && (
+ <EditItemView endpoint="calendars" item={item} setItem={setItem} validate={validate}>
+ {item && (
<>
<Accordion defaultExpanded>
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
@@ -74,7 +75,7 @@ const CalendarPage = () => {
</AccordionDetails>
</Accordion>
</>
- )}
+ )}
</EditItemView>
);
};