ETHReport/components/projectsList/index.js

27 lines
618 B
JavaScript
Raw Normal View History

import React from 'react';
import AnchorLink from 'react-anchor-link-smooth-scroll';
2018-07-09 14:29:57 +00:00
import { PropTypes } from 'prop-types';
import Data from '../../data/archives/projects';
import './style.scss';
2018-07-09 14:29:57 +00:00
const ProjectsList = props => (
<div className="projects-list">
<h4>Projects</h4>
<ul>
{
2018-07-09 14:29:57 +00:00
Data.map(project => (
<li key={project}>
<AnchorLink href="#browse" onClick={props.setSearchTerm}>{ project }</AnchorLink>
2018-07-09 14:29:57 +00:00
</li>
))
}
</ul>
</div>
);
2018-07-09 14:29:57 +00:00
ProjectsList.propTypes = {
setSearchTerm: PropTypes.func.isRequired,
};
export default ProjectsList;