From 7c4c6b8648c14b2e32c2fb8ad490933ceafe9061 Mon Sep 17 00:00:00 2001 From: GabrielMBatista Date: Sun, 10 Jan 2021 14:25:58 -0300 Subject: [PATCH] carrinho tentando implementar o carriinho --- src/App.js | 45 +++++----------- src/Componentes/Carrinho/CarrinhoCompras.js | 31 ++++++----- src/Componentes/FiltroPrecos/FiltroPodutos.js | 18 ++++--- src/Componentes/Produto/ListaDeProdutos.js | 53 ++++++++++++------- 4 files changed, 74 insertions(+), 73 deletions(-) diff --git a/src/App.js b/src/App.js index b0eba9f..f757acf 100644 --- a/src/App.js +++ b/src/App.js @@ -108,34 +108,14 @@ const produtosLista = [ imagem: img6, quantidade: 1, }, - { - id: 7, - nome: 'Paco Rabanne', - preco: 880, - imagem: img2, - quantidade: 1, - }, - { - id: 8, - nome: 'Paco Rabanne', - preco: 599, - imagem: img4, - quantidade: 1, - }, - { - id: 9, - nome: 'Paco Rabanne', - preco: 1210, - imagem: img1, - quantidade: 1, - }, ]; +let CarrinhoLista = []; class App extends React.Component { state = { VisorAtivo: false, - ValorMin: 0, - ValorMax: 0, + ValorMin: 1, + ValorMax: 2000, NomeProduto: '', } @@ -144,11 +124,12 @@ class App extends React.Component { VisorAtivo: !this.state.VisorAtivo }) } - CarregarTela = () => { + + + CarregarCarrinho = () => { if (this.state.VisorAtivo) { return ( - - + ) } else @@ -175,26 +156,24 @@ class App extends React.Component { } - render() { return ( - {this.CarregarTela()} + {this.CarregarCarrinho()}
header
- +

FiltroPreços

    - - - + + +
-