{"size": 556, "ext": "js", "max_stars_repo_path": "src/components/postTags.js", "max_stars_repo_name": "webermn15/blogolio", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/postTags.js", "max_issues_repo_name": "webermn15/blogolio", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/postTags.js", "max_forks_repo_name": "webermn15/blogolio", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.24, "max_line_length": 92, "alphanum_fraction": 0.6043165468}
import React from 'react'
import { Link } from 'gatsby'

const PostTags = ({edges}) => {
	const allTags = edges.reduce((acc, curr) => {
		curr.node.frontmatter.tags.forEach(tag => {
			if (acc.indexOf(tag) < 0) {
				acc.push(tag)
			}
		})
		return acc
	}, [])
	return(
		<div className="archive__container">
			<div className="widget-title subtitle-border">
				Browse by tag
			</div>
			{allTags.map((tag, i) => {
				return <div className="widget-link" key={i}><Link to={`/tags/${tag}`}>{tag}</Link></div>
			})}
		</div>
	)
}

export default PostTags