Skip to content

Commit

Permalink
filtrando times
Browse files Browse the repository at this point in the history
  • Loading branch information
Andresavieira28 committed Feb 12, 2024
1 parent a27d255 commit f24cb12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ function App() {
<div className="App">
<Banner />

<Form times={times.map(time => time.nome)} aoColaboradorCadastrado = {colaboorador => aoNovoColaboradorAdd(colaboorador)}/>
<Form times={times.map(time => time.nome)} aoColaboradorCadastrado = {colaborador => aoNovoColaboradorAdd(colaborador)}/>

{times.map(time => <Time
key={time.nome}
nome= {time.nome}
corPrimaria={time.corPrimaria}
corSecundaria={time.corSecundaria}
colaboradores={colaboradores}
colaboradores={colaboradores.filter(colaborador => colaborador.time === time.nome)}
/>)}
</div>
);
Expand Down
5 changes: 2 additions & 3 deletions src/componentes/Time/time.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
display: inline-block;
padding-bottom: 8px;
}

.time.colaboradores {
.time .colaboradores {
display: flex;
justify-content: space-around;
margin-top: 32px;
flex-wrap: wrap;
}
}

0 comments on commit f24cb12

Please sign in to comment.