2018-07-05 09:59:42 +00:00
|
|
|
import React from 'react';
|
2018-07-09 14:29:57 +00:00
|
|
|
import { PropTypes } from 'prop-types';
|
2018-07-05 09:59:42 +00:00
|
|
|
import Data from '../../data/archives/topics';
|
|
|
|
import './style.scss';
|
|
|
|
|
2018-07-09 14:29:57 +00:00
|
|
|
const TopicsList = props => (
|
2018-07-05 09:59:42 +00:00
|
|
|
<div className="topics-list">
|
|
|
|
<h4>Topics</h4>
|
|
|
|
<ul>
|
|
|
|
{
|
2018-07-09 14:29:57 +00:00
|
|
|
Data.map(topic => (
|
|
|
|
// eslint-disable-next-line
|
|
|
|
<li key={topic} onClick={props.setSearchTerm}>
|
|
|
|
<span>{ topic }</span>
|
|
|
|
</li>
|
|
|
|
))
|
2018-07-05 09:59:42 +00:00
|
|
|
}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
);
|
2018-07-09 14:29:57 +00:00
|
|
|
|
|
|
|
TopicsList.propTypes = {
|
|
|
|
setSearchTerm: PropTypes.func.isRequired,
|
|
|
|
};
|
|
|
|
|
|
|
|
export default TopicsList;
|