Skip to content

Commit

Permalink
fix(single word): exclude duplicated words
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-berlin committed May 18, 2024
1 parent 523ad6e commit f080497
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/pages/wort/[...wordSlug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -291,15 +291,17 @@ const wordTags = translateNlpTags(getWordType(word.wordProperties?.berlinerisch!
<div class="c-single-word__related-words-wrapper">
<h3>Verwandte Worte:</h3>
<ul class="c-single-word__related-words-list">
{wordProps.relatedWords.nodes.map((word): BerlinerWord[] => {
return (
<li class="c-single-word__related-word">
<a href={routeToWord(word?.slug)} class="c-single-word__related-word-link">
{word?.wordProperties?.berlinerisch}
</a>
</li>
);
})}
{wordProps.relatedWords.nodes
.filter((word) => word?.wordProperties?.berlinerisch !== wordProps?.berlinerisch)
.map((word): BerlinerWord[] => {
return (
<li class="c-single-word__related-word">
<a href={routeToWord(word?.slug)} class="c-single-word__related-word-link">
{word?.wordProperties?.berlinerisch}
</a>
</li>
);
})}
</ul>
</div>
)
Expand Down

0 comments on commit f080497

Please sign in to comment.