Showing
1 changed file
with
8 additions
and
3 deletions
... | @@ -62,7 +62,7 @@ const StyledLink = styled(Link)` | ... | @@ -62,7 +62,7 @@ const StyledLink = styled(Link)` |
62 | } | 62 | } |
63 | `; | 63 | `; |
64 | 64 | ||
65 | -export default ({ location }) => { | 65 | +export default ({ location, categories }) => { |
66 | const { pathname } = location; | 66 | const { pathname } = location; |
67 | let path; | 67 | let path; |
68 | return ( | 68 | return ( |
... | @@ -74,11 +74,16 @@ export default ({ location }) => { | ... | @@ -74,11 +74,16 @@ export default ({ location }) => { |
74 | <FontAwesomeIcon icon={faArrowDown} /> Category | 74 | <FontAwesomeIcon icon={faArrowDown} /> Category |
75 | <FontAwesomeIcon icon={faPlus} /> | 75 | <FontAwesomeIcon icon={faPlus} /> |
76 | </ItemListTopBox> | 76 | </ItemListTopBox> |
77 | - <StyledLink> | 77 | + {categories && |
78 | + categories.map((e) => | ||
79 | + (path = pathname + "/:" + e.name)( | ||
80 | + <StyledLink to={path} key={e.id}> | ||
78 | <Item> | 81 | <Item> |
79 | - <ItemText># Music</ItemText> | 82 | + <ItemText># {e.name}</ItemText> |
80 | </Item> | 83 | </Item> |
81 | </StyledLink> | 84 | </StyledLink> |
85 | + ) | ||
86 | + )} | ||
82 | </ItemList> | 87 | </ItemList> |
83 | </ItemListContainer> | 88 | </ItemListContainer> |
84 | </CategoryContainer> | 89 | </CategoryContainer> | ... | ... |
-
Please register or login to post a comment