fix adding issue

This commit is contained in:
feruz 2021-03-14 23:46:00 +02:00
parent 25c1bf0585
commit 0ce665c26b

View File

@ -62,7 +62,8 @@ const SnippetEditorModal = ({username, onSnippetsUpdated}: SnippetEditorModalPro
console.log("Response from add snippet: ", response)
}else{
console.log("Saving snippet:", username, title, body)
response = await addSnippet(username, title, body)
const res = await addSnippet(username, title, body)
response = res && res.fragments
console.log("Response from add snippet: ", response)
}
setShowModal(false);