Customize addWord messaging

This commit is contained in:
Robbie Antenesse 2019-05-10 15:31:01 -06:00
parent 048c964405
commit 3f17a19c50
1 changed files with 5 additions and 3 deletions

View File

@ -78,9 +78,11 @@ export function clearWordForm() {
document.getElementById('wordName').focus(); document.getElementById('wordName').focus();
} }
export function addWord(word, render = true) { export function addWord(word, render = true, message = true) {
window.currentDictionary.words.push(word); window.currentDictionary.words.push(word);
addMessage('Word Created Successfully'); if (message) {
addMessage(`<a href="#${word.wordId}">${word.name}</a> Created Successfully`, 10000);
}
sortWords(render); sortWords(render);
} }