2016-03-30 09:24:52 +09:00
|
|
|
import React from 'react';
|
2016-04-14 10:12:35 +09:00
|
|
|
import Router from '../router.js';
|
2016-03-23 11:46:56 +09:00
|
|
|
|
2016-04-14 10:12:35 +09:00
|
|
|
const PostsCategories = ({post}) => {
|
2016-02-17 17:22:32 +09:00
|
|
|
return (
|
2016-04-19 15:45:36 +09:00
|
|
|
<div className="posts-categories">
|
2016-05-03 12:44:50 +09:00
|
|
|
{post.categoriesArray.map(category => <a className="posts-category" key={category._id} href={Router.path("posts.list", {}, {cat: category.slug})}>{category.name}</a>)}
|
2016-02-19 10:12:08 +09:00
|
|
|
</div>
|
2016-02-17 17:22:32 +09:00
|
|
|
)
|
|
|
|
};
|
|
|
|
|
2016-04-14 10:12:35 +09:00
|
|
|
module.exports = PostsCategories;
|