Skip to content

Commit

Permalink
Merge pull request #8 from layshidani/saloon
Browse files Browse the repository at this point in the history
Improvements on Saloon page, remove unused code on home page
  • Loading branch information
layshidani authored Jun 12, 2019
2 parents a9a6900 + fc1feaa commit 73b00e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/pages/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class Home extends Component {
email: '',
password: '',
displayName: '',
userType: 'saloon'
};
}

Expand Down Expand Up @@ -48,7 +47,7 @@ class Home extends Component {
}

signIn = () => {
const { email, password, userType } = this.state;
const { email, password } = this.state;
this.props.signInWithEmailAndPassword(email, password)
.then((resp) => {
const id = resp.user.uid;
Expand Down
5 changes: 3 additions & 2 deletions src/pages/saloon.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ class Saloon extends Component {
return (
<section className='order'>
<h1>Olá {this.state.name}, você está no Salão</h1>
<p>Clique nos itens para adicioná-los ao pedido.</p>
<h2>Café da manhã: </h2>
<div className='items'>
{
Expand Down Expand Up @@ -149,7 +150,7 @@ class Saloon extends Component {
}
</div>
<div className='order-list'>
<h1>Pedido</h1>
<h1>Resumo do Pedido</h1>
<div ref='orderList'>
{
this.state.order.map((item, i) => {
Expand All @@ -158,8 +159,8 @@ class Saloon extends Component {
<p>
Produto: {item.title} - Qtd: {item.quantity} - Subtotal: R$ {item.price * item.quantity}
</p>
<Button className='plus-minus-btn' iconName={faPlusCircle} onClick={() => this.handleAdd(item)}></Button>
<Button className='plus-minus-btn' iconName={faMinusCircle} onClick={() => this.handleDelete(item)}></Button>
<Button className='plus-minus-btn' iconName={faPlusCircle} onClick={() => this.handleAdd(item)}></Button>
</div>
)
})
Expand Down

0 comments on commit 73b00e4

Please sign in to comment.