Show a message when no words

This commit is contained in:
Robbie Antenesse 2019-05-08 12:20:30 -06:00
parent 16ef8cfb2e
commit aecac1668e
1 changed files with 12 additions and 1 deletions

View File

@ -106,8 +106,19 @@ export function renderPartsOfSpeech() {
}
export function renderWords() {
const words = getMatchingSearchWords();
let wordsHTML = '';
if (window.currentDictionary.words.length === 0) {
wordsHTML = `<article class="entry">
<header>
<h4 class="word">No Words Created</h4>
</header>
<dl>
<dt class="definition">Use the Word Form to create words or click the Help button below!</dt>
</dl>
</article>`;
}
const words = getMatchingSearchWords();
const openEditForms = getOpenEditForms();