Commit 054c0d9d by PLN (Algolia)

tdah: glossary shows the term once, not twice

parent d973dc5c
...@@ -10,12 +10,16 @@ export default function GlossaryView({ t, styles, onBack }) { ...@@ -10,12 +10,16 @@ export default function GlossaryView({ t, styles, onBack }) {
<div className={styles.root}> <div className={styles.root}>
<h1>{t['glossary.title']}</h1> <h1>{t['glossary.title']}</h1>
<dl> <dl>
{keys.map((k) => ( {keys.map((k) => {
const entry = t['glossary.' + k];
const cut = entry.indexOf('. ');
return (
<div key={k} className={styles.glossEntry}> <div key={k} className={styles.glossEntry}>
<dt>{t['glossary.' + k].split('.')[0]}</dt> <dt>{entry.slice(0, cut)}</dt>
<dd>{t['glossary.' + k]}</dd> <dd>{entry.slice(cut + 2)}</dd>
</div> </div>
))} );
})}
</dl> </dl>
<button className={styles.btn} onClick={onBack}>{t['header.logo.h1']}</button> <button className={styles.btn} onClick={onBack}>{t['header.logo.h1']}</button>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment