Skip to content

Instantly share code, notes, and snippets.

@KSXGitHub
Last active December 28, 2017 16:38
Show Gist options
  • Save KSXGitHub/e0429d6605e424b7809f507fd9707aad to your computer and use it in GitHub Desktop.
Save KSXGitHub/e0429d6605e424b7809f507fd9707aad to your computer and use it in GitHub Desktop.
const {catelogueNameValidation, activeStatusValidation} = formValidation
if (catelogueNameValidation || activeStatusValidation) return // Seriously, don't ever use 'null'
switch (submitType) {
case 'add':
this.props.postCatalogues(catelogue)
break
case 'edit':
this.props.updateCatalogues(_id, catalogue)
break
}
this.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment