formatted the categories

This commit is contained in:
J-Klinke 2024-07-01 10:42:25 +02:00
parent d9707a25df
commit 1dfd2f765a

View File

@ -173,10 +173,10 @@ function fetchCategories() {
fetch(fetchURL)
.then(resp => resp.json())
.then((data) => {
console.log(data); // TODO remove
for (let i = 0; i < data.length; i++) {
console.log(data[i]); // TODO remove
document.getElementById("other-categories").appendChild(new Option(data[i]));
let category = data[i].toLowerCase();
category = category.charAt(0).toUpperCase() + category.slice(1);
document.getElementById("other-categories").appendChild(new Option(category));
}
});
}