2018-11-09 17:17:14 +01:00
|
|
|
import React from 'react'
|
|
|
|
import PropTypes from 'prop-types'
|
2019-09-18 11:21:18 +02:00
|
|
|
import Repository from '../Repository'
|
2018-11-09 17:17:14 +01:00
|
|
|
import styles from './RepositoryList.module.scss'
|
|
|
|
|
|
|
|
const RepositoryList = ({ repositories }) => (
|
2020-07-01 11:24:21 +02:00
|
|
|
<div className={styles.repositoryCategory}>
|
|
|
|
{repositories.map(({ node }) => (
|
|
|
|
<div key={node.id}>
|
|
|
|
<h3 className={styles.repositoryCategoryTitle}>{node.group}</h3>
|
2018-11-09 17:17:14 +01:00
|
|
|
|
2020-07-01 11:24:21 +02:00
|
|
|
<div className={styles.repositoryList}>
|
|
|
|
{node.items.map((item) => (
|
|
|
|
<Repository key={item.name} name={item.name} links={item.links} />
|
|
|
|
))}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
))}
|
|
|
|
</div>
|
2018-11-09 17:17:14 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
RepositoryList.propTypes = {
|
2020-07-01 11:24:21 +02:00
|
|
|
repositories: PropTypes.array.isRequired
|
2018-11-09 17:17:14 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export default RepositoryList
|