2019-11-26 18:25:42 +01:00
|
|
|
import React, { memo } from 'react'
|
2019-05-26 16:55:56 +02:00
|
|
|
import PropTypes from 'prop-types'
|
2019-05-26 17:50:19 +02:00
|
|
|
|
2019-05-26 16:55:56 +02:00
|
|
|
import Repository from '../molecules/Repository'
|
2021-03-12 23:47:28 +01:00
|
|
|
import {
|
|
|
|
section,
|
|
|
|
sectionTitle,
|
|
|
|
repos as styleRepos
|
|
|
|
} from './Repositories.module.css'
|
2019-05-26 16:55:56 +02:00
|
|
|
|
2019-11-26 18:25:42 +01:00
|
|
|
Repositories.propTypes = {
|
|
|
|
repos: PropTypes.array
|
|
|
|
}
|
2019-05-26 16:55:56 +02:00
|
|
|
|
2019-11-26 18:25:42 +01:00
|
|
|
function Repositories({ repos }) {
|
|
|
|
if (!repos) return null
|
2019-07-04 09:48:48 +02:00
|
|
|
|
2019-11-26 18:25:42 +01:00
|
|
|
return (
|
2021-03-12 23:47:28 +01:00
|
|
|
<section className={section}>
|
|
|
|
<h1 className={sectionTitle}>Open Source Projects</h1>
|
|
|
|
<div className={styleRepos}>
|
2020-03-21 23:55:40 +01:00
|
|
|
{repos.map((repo) => (
|
2019-11-26 18:25:42 +01:00
|
|
|
<Repository key={repo.name} repo={repo} />
|
|
|
|
))}
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
)
|
2019-05-26 16:55:56 +02:00
|
|
|
}
|
2019-11-26 18:25:42 +01:00
|
|
|
|
|
|
|
export default memo(Repositories)
|