We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ab4333 commit 5b08534Copy full SHA for 5b08534
1 file changed
‎components/Press/PressLinks/ArticleGroup/ArticleGroup.js‎
@@ -32,15 +32,13 @@ class ArticleGroup extends Component {
32
<h2>{region}</h2>
33
<ul>
34
{articles.map((link, index) => {
35
- if (index < numberOfInitiallyVisibleLinks && areAllLinksVisible) {
36
- return (
37
- <li key={`GroupLink_${link.url}`}>
38
- <OutboundLink href={link.url}>{link.title}</OutboundLink>
39
- </li>
40
- );
41
- }
42
-
43
- return null;
+ const isArticleVisible = areAllLinksVisible || index < numberOfInitiallyVisibleLinks;
+
+ return isArticleVisible ? (
+ <li key={`GroupLink_${link.url}`}>
+ <OutboundLink href={link.url}>{link.title}</OutboundLink>
+ </li>
+ ) : null;
44
})}
45
</ul>
46
{articles.length > numberOfInitiallyVisibleLinks && (
0 commit comments