function submitBookmark(event) {
    event.preventDefault()
    if (!name && !link && !category) {
      return
    }
    if (!name || !link || !category) {
      return
    }

    console.log('Name is set to', name)
    console.log('Link is set to', link)
    console.log('Category is set to', category)

    setBookmarks({ type: 'SET_BOOKMARKS', payload: { name, link, category } })
    setName('')
    setLink('')
    setCategory('')

    props.setSuccessSnackbar()
  }
/**
   * Submit the bookmark data.
   * @params {object} event - The event object provided by the browser API.
   * @returns void
   */
Submit the bookmark data.
@params {object} event - The event object provided by the browser API.
@returns void
Submit the bookmark data . @params { object } event - The event object provided by the browser API . @returns void
function submitBookmark(event) {
    event.preventDefault()
    if (!name && !link && !category) {
      return
    }
    if (!name || !link || !category) {
      return
    }
    console.log('Name is set to', name)
    console.log('Link is set to', link)
    console.log('Category is set to', category)
    setBookmarks({ type: 'SET_BOOKMARKS', payload: { name, link, category } })
    setName('')
    setLink('')
    setCategory('')
    props.setSuccessSnackbar()
  }
function submitBookmark ( event ) { event . preventDefault ( ) if ( ! name && ! link && ! category ) { return } if ( ! name || ! link || ! category ) { return } console . log ( 'Name is set to' , name ) console . log ( 'Link is set to' , link ) console . log ( 'Category is set to' , category ) setBookmarks ( { type : 'SET_BOOKMARKS' , payload : { name , link , category } } ) setName ( '' ) setLink ( '' ) setCategory ( '' ) props . setSuccessSnackbar ( ) }
Submit the bookmark data.
Submit the bookmark data .