1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

fix for showing links on all repos

This commit is contained in:
Matthias Kretschmann 2018-11-21 17:32:24 +01:00
parent 441f19da69
commit 026587c409
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -224,17 +224,17 @@ const Repository = ({ name, links, readme }) => (
// enhance passed links array with what's in repositories.yml, // enhance passed links array with what's in repositories.yml,
// iterating over all repos until we have a name match // iterating over all repos until we have a name match
const linksFilteredArray = repositoriesYaml.map(({ node }) => { let linksFilteredArray = []
return node.items
.map(item => { repositoriesYaml.map(({ node }) => {
node.items.forEach(item => {
if (item.name === name) { if (item.name === name) {
return item.links linksFilteredArray.push(item.links)
} }
}) })
.filter(n => n)[0]
}) })
const moreLinks = links || linksFilteredArray[0] const moreLinks = links || linksFilteredArray.filter(n => n)[0]
return ( return (
<article className={styles.repository}> <article className={styles.repository}>