Vulcan/packages/nova-base-components/lib/posts/PostsCategories.jsx

12 lines
377 B
React
Raw Normal View History

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 (
<div className="posts-categories">
{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;