2016-11-17 20:42:16 +01:00
|
|
|
import Telescope from 'meteor/nova:lib';
|
2016-03-30 09:24:52 +09:00
|
|
|
import React from 'react';
|
2016-06-14 10:01:44 +09:00
|
|
|
import { Link } from 'react-router';
|
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-10-19 17:38:21 +02:00
|
|
|
{post.categories.map(category =>
|
2016-06-14 10:17:11 +09:00
|
|
|
<Link className="posts-category" key={category._id} to={{pathname: "/", query: {cat: category.slug}}}>{category.name}</Link>
|
2016-06-14 10:01:44 +09:00
|
|
|
)}
|
2016-02-19 10:12:08 +09:00
|
|
|
</div>
|
2016-02-17 17:22:32 +09:00
|
|
|
)
|
|
|
|
};
|
|
|
|
|
2016-05-22 16:42:24 +09:00
|
|
|
PostsCategories.displayName = "PostsCategories";
|
|
|
|
|
2016-11-17 20:42:16 +01:00
|
|
|
Telescope.registerComponent('PostsCategories', PostsCategories);
|