mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-01 15:55:34 +01:00
Merge pull request #53 from oceanprotocol/fix/48b
fix for showing links on all repos
This commit is contained in:
commit
4232fc3f57
@ -224,17 +224,17 @@ const Repository = ({ name, links, readme }) => (
|
||||
|
||||
// enhance passed links array with what's in repositories.yml,
|
||||
// iterating over all repos until we have a name match
|
||||
const linksFilteredArray = repositoriesYaml.map(({ node }) => {
|
||||
return node.items
|
||||
.map(item => {
|
||||
if (item.name === name) {
|
||||
return item.links
|
||||
}
|
||||
})
|
||||
.filter(n => n)[0]
|
||||
let linksFilteredArray = []
|
||||
|
||||
repositoriesYaml.map(({ node }) => {
|
||||
node.items.forEach(item => {
|
||||
if (item.name === name) {
|
||||
linksFilteredArray.push(item.links)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
const moreLinks = links || linksFilteredArray[0]
|
||||
const moreLinks = links || linksFilteredArray.filter(n => n)[0]
|
||||
|
||||
return (
|
||||
<article className={styles.repository}>
|
||||
|
Loading…
Reference in New Issue
Block a user