sdy

add props

......@@ -62,7 +62,7 @@ const StyledLink = styled(Link)`
}
`;
export default ({ location }) => {
export default ({ location, categories }) => {
const { pathname } = location;
let path;
return (
......@@ -74,11 +74,16 @@ export default ({ location }) => {
<FontAwesomeIcon icon={faArrowDown} /> Category
<FontAwesomeIcon icon={faPlus} />
</ItemListTopBox>
<StyledLink>
{categories &&
categories.map((e) =>
(path = pathname + "/:" + e.name)(
<StyledLink to={path} key={e.id}>
<Item>
<ItemText># Music</ItemText>
<ItemText># {e.name}</ItemText>
</Item>
</StyledLink>
)
)}
</ItemList>
</ItemListContainer>
</CategoryContainer>
......