2018-07-05 09:59:42 +00:00
|
|
|
import React from 'react';
|
2018-07-11 09:16:33 +00:00
|
|
|
import AnchorLink from 'react-anchor-link-smooth-scroll';
|
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 => (
|
2018-07-11 09:16:33 +00:00
|
|
|
<li key={topic}>
|
|
|
|
<AnchorLink href="#browse" onClick={props.setSearchTerm}>{ topic }</AnchorLink>
|
2018-07-09 14:29:57 +00:00
|
|
|
</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;
|