[Dev] Simplify `generateChangelogText` function
Closed this issue · 0 comments
cjmaxik commented
Something like this:
const generateChangelogText = (type, lang) => {
if (!changelogText[type] || !changelogText[type][lang]) {
return "<ul><li>🤷</li></ul>";
}
const changes = changelogText[type][lang];
return `
<ul>
${changes.map(change => `<li>${change}</li>`).join('')}
</ul>
`;
}