-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
40 additions
and
48 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
imports/plugins/core/checkout/client/components/cartPanel.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from "react"; | ||
import PropTypes from "prop-types"; | ||
import { Components } from "@reactioncommerce/reaction-components"; | ||
|
||
const CartPanel = () => ( | ||
<div style={{ textAlign: "center" }}> | ||
<span id="spin" > | ||
<i className="fa fa-circle-o-notch fa-spin fa-3x fa-fw" | ||
style={{ marginBottom: "10px", marginTop: "10px", fontSize: "2.65em" }} | ||
/> | ||
</span> | ||
<div className="cart-alert-text">{}</div> | ||
<div className="cart-alert-checkout"> | ||
<Components.Button | ||
id="btn-checkout" | ||
bezelStyle="solid" | ||
className="btn-lg btn-block" | ||
i18nKeyLabel="cartDrawer.checkout" | ||
label="Checkout now" | ||
onClick={this.props.onClick || this.props.checkout} | ||
status="success" | ||
/> | ||
</div> | ||
</div> | ||
); | ||
|
||
CartPanel.propTypes = { | ||
checkout: PropTypes.func, | ||
onClick: PropTypes.func | ||
}; | ||
|
||
export default CartPanel; |
20 changes: 8 additions & 12 deletions
20
...cartPanel/container/cartPanelContainer.js → ...ut/client/container/cartPanelContainer.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,18 @@ | ||
import React, { Component } from "react"; | ||
import { mapProps } from "recompose"; | ||
import { registerComponent } from "@reactioncommerce/reaction-components"; | ||
import { $ } from "meteor/jquery"; | ||
import { Session } from "meteor/session"; | ||
import { Reaction } from "/client/api"; | ||
import CartPanel from "../component/cartPanel"; | ||
|
||
class CartPanelContainer extends Component { | ||
handleCheckout() { | ||
const handlers = { | ||
checkout() { | ||
$("#cart-drawer-container").fadeOut(); | ||
Session.set("displayCart", false); | ||
return Reaction.Router.go("cart/checkout"); | ||
} | ||
render() { | ||
return ( | ||
<CartPanel | ||
checkout={this.handleCheckout} | ||
/> | ||
); | ||
} | ||
} | ||
}; | ||
|
||
registerComponent("CartPanel", CartPanel, mapProps(handlers)); | ||
|
||
export default CartPanelContainer; | ||
export default mapProps(handlers)(CartPanel); |
36 changes: 0 additions & 36 deletions
36
imports/plugins/core/checkout/client/templates/cartPanel/component/cartPanel.js
This file was deleted.
Oops, something went wrong.