aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings/DriverPage.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/settings/DriverPage.js')
-rw-r--r--modern/src/settings/DriverPage.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/modern/src/settings/DriverPage.js b/modern/src/settings/DriverPage.js
index a185405e..ff703916 100644
--- a/modern/src/settings/DriverPage.js
+++ b/modern/src/settings/DriverPage.js
@@ -20,10 +20,11 @@ const DriverPage = () => {
const [item, setItem] = useState();
+ const validate = () => item && item.name && item.uniqueId;
+
return (
- <EditItemView endpoint="drivers" item={item} setItem={setItem}>
- {item
- && (
+ <EditItemView endpoint="drivers" item={item} setItem={setItem} validate={validate}>
+ {item && (
<>
<Accordion defaultExpanded>
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
@@ -63,7 +64,7 @@ const DriverPage = () => {
</AccordionDetails>
</Accordion>
</>
- )}
+ )}
</EditItemView>
);
};