Adicionando subcategorias para uma tribo

in #nitrous-ptbr3 years ago (edited)

Navegue para src/app/components/pages/PostsIndex.jsx abre o arquivo e procure por: let page_title e adicione let sub_categ = []; (pode chamar a variavel de qualquer coisa).

Depois procure por: else if (category) abaixo de page_title = '#' + category; adicione uma condição if:

if(category === 'nomedatag'){ page_title = 'Carros'; sub_categ[0] = <Link to="/created/ferrari">Ferrari</Link>; sub_categ[1] = <Link to="/created/fusca">Fusca</Link>; sub_categ[2] = <Link to="/created/templa">Templa</Link>; sub_categ[3] = <Link to="/created/fiat">Uno</Link>; }

Troque o nome da tag para a tag que voce quer adicionar a sub categoria. E não esqueça de adicionar o else:

else{ sub_categ = []; sub_categ = ["Unmoderated tag"]; }

Adicione para o tanto de tags que você quiser.

agora procure por Unmoderated tag e o substitua por(não é da condição else não):

<div className="TagList__horizontal">{sub_categ}</div>

Indice de Posts

Sort:  

Congratulations @sm-silva! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

You received more than 300 upvotes.
Your next target is to reach 400 upvotes.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out the last post from @hivebuzz:

A successful meetup and its commemorative badge