add create plan buttons to texts list
This commit is contained in:
parent
9ced96fc88
commit
39539313c9
1 changed files with 5 additions and 1 deletions
|
|
@ -5,7 +5,11 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||||
const response = await fetch('/api/texts');
|
const response = await fetch('/api/texts');
|
||||||
const texts = await response.json();
|
const texts = await response.json();
|
||||||
textsList.innerHTML = texts
|
textsList.innerHTML = texts
|
||||||
.map(text => '<li>' + text.name + '</li>')
|
.map(text =>
|
||||||
|
'<li>' + text.name +
|
||||||
|
' <button class="create-plan" data-text-id="' +
|
||||||
|
text.id + '">Create plan</button></li>'
|
||||||
|
)
|
||||||
.join('');
|
.join('');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue