Commit 712dee2f authored by Shaphen Pangburn's avatar Shaphen Pangburn

[Team]: Add disabled button animation logic to modals for Products

parent 48298d13
...@@ -85,15 +85,18 @@ export default class ProductDetails extends Component { ...@@ -85,15 +85,18 @@ export default class ProductDetails extends Component {
<form className="details-add-cart-and-quantity" onSubmit={ e => this.handleSubmit(e, this.props.product) }> <form className="details-add-cart-and-quantity" onSubmit={ e => this.handleSubmit(e, this.props.product) }>
<input <input
type="number" type="number"
className="prod-details-quantity" className="prod-details-quantity"
id={ this.props.user?.currentUser ? "" : "disabled" }
disabled={ !this.props.user?.currentUser } disabled={ !this.props.user?.currentUser }
onChange={this.handleChange("orderItemQuantity")} onChange={this.handleChange("orderItemQuantity")}
placeholder="Quantity" placeholder="Quantity"
value={ this.state.orderItemQuantity } value={ this.state.orderItemQuantity }
/> />
<button className="prod-details-add-to-cart" disabled={ !this.props.user?.currentUser }> <button
Add to Cart className="prod-details-add-to-cart"
</button> id={ this.props.user?.currentUser ? "" : "disabled" }
disabled={ !this.props.user?.currentUser
}>Add to Cart</button>
{ this.props.user?.currentUser ? "" :<p id="details-please-log-in-notice">Log in to Add to Cart</p>} { this.props.user?.currentUser ? "" :<p id="details-please-log-in-notice">Log in to Add to Cart</p>}
</form> </form>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment