Merge pull request #56 from harad1/new-event-validation

Basic validation for New Event Type to prevent unexpected behaviour
pull/81/head
Bailey Pumfleet 2021-04-20 11:33:53 +01:00 committed by GitHub
commit 6b3ba4edae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -61,8 +61,9 @@ export default function Availability(props) {
}
});
console.log(response);
Router.reload();
if (enteredTitle && enteredLength) {
Router.reload();
}
}
async function updateStartEndTimesHandler(event) {
@ -217,6 +218,7 @@ export default function Availability(props) {
</div>
</div>
</div>
{/* TODO: Add an error message when required input fields empty*/}
<div className="mt-5 sm:mt-4 sm:flex sm:flex-row-reverse">
<button type="submit" className="btn btn-primary">
Create