diff --git a/src/js/wordManagement.js b/src/js/wordManagement.js index 47a9a11..a403b61 100644 --- a/src/js/wordManagement.js +++ b/src/js/wordManagement.js @@ -74,13 +74,15 @@ export function clearWordForm() { document.getElementById('wordPartOfSpeech').value = ''; document.getElementById('wordDefinition').value = ''; document.getElementById('wordDetails').value = ''; - + document.getElementById('wordName').focus(); } -export function addWord(word, render = true) { +export function addWord(word, render = true, message = true) { window.currentDictionary.words.push(word); - addMessage('Word Created Successfully'); + if (message) { + addMessage(`${word.name} Created Successfully`, 10000); + } sortWords(render); }