1
0
Fork 0
mirror of https://github.com/Alamantus/Lexiconga.git synced 2025-05-23 02:20:06 +02:00

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

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();