mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 04:26:41 -04:00

- Posts, Comments, Users, etc. are always pluralized. - CSS classes are based off component names (PostsTitle -> posts-title)
12 lines
No EOL
350 B
JavaScript
12 lines
No EOL
350 B
JavaScript
import React from 'react';
|
|
import Router from '../router.js';
|
|
|
|
const PostsCategories = ({post}) => {
|
|
return (
|
|
<div className="posts-categories">
|
|
{post.categoriesArray.map(category => <a key={category._id} href={Router.path("posts.list", {}, {cat: category.slug})}>{category.name}</a>)}
|
|
</div>
|
|
)
|
|
};
|
|
|
|
module.exports = PostsCategories; |