You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

2 rivejä
9.9 KiB

  1. (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9190],{91288:function(e,r,t){"use strict";var n=t(85893);t(67294);r.Z=function(e){var r=e.pageTitle;return(0,n.jsx)("div",{className:"page-title-area",children:(0,n.jsx)("div",{className:"d-table",children:(0,n.jsx)("div",{className:"d-table-cell",children:(0,n.jsx)("div",{className:"container",children:(0,n.jsx)("h2",{children:r})})})})})}},59496:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return y}});var n=t(85893),s=(t(67294),t(8805)),i=t(16918),c=t(91288),o=t(26265),l=t(41664),a=t(30833),u=t(39704),d=t(85611),p=t(11163),h=t(20210),f=t(61896),j=function(e){var r=e.id,t=e.quantity,s=(0,u.I0)();return(0,n.jsxs)("div",{className:"input-counter",children:[(0,n.jsx)("span",{className:"minus-btn",onClick:function(e){e.preventDefault(),s({type:"SUB_QUANTITY",id:r})},children:(0,n.jsx)(h.Z,{})}),(0,n.jsx)("input",{type:"text",min:"1",value:t,readOnly:!0,onChange:function(e){return e}}),(0,n.jsx)("span",{className:"plus-btn",onClick:function(e){e.preventDefault(),s({type:"ADD_QUANTITY",id:r})},children:(0,n.jsx)(f.Z,{})})]})};function x(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function m(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?x(Object(t),!0).forEach((function(r){(0,o.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var v=function(){var e=(0,p.useRouter)(),r=(0,d.e1)().addToast,t=(0,u.I0)(),s=(0,u.v9)((function(e){return e.cart})),i=(0,u.v9)((function(e){return e.total}));return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"cart-table table-responsive",children:(0,n.jsxs)("table",{className:"table table-bordered",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{scope:"col",children:"Product"}),(0,n.jsx)("th",{scope:"col",children:"Name"}),(0,n.jsx)("th",{scope:"col",children:"Unit Price"}),(0,n.jsx)("th",{scope:"col",children:"Quantity"}),(0,n.jsx)("th",{scope:"col",children:"Total"})]})}),(0,n.jsx)("tbody",{children:s.length?s.map((function(e){return(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:"product-thumbnail",children:(0,n.jsx)(l.default,{href:"/product-details",children:(0,n.jsx)("a",{children:(0,n.jsx)("img",{src:e.image,alt:"item"})})})}),(0,n.jsx)("td",{className:"product-name",children:(0,n.jsx)(l.default,{href:"/product-details",children:(0,n.jsx)("a",{children:e.name})})}),(0,n.jsx)("td",{className:"product-price",children:(0,n.jsxs)("span",{className:"unit-amount",children:["$",e.price]})}),(0,n.jsx)("td",{className:"product-quantity",children:(0,n.jsx)(j,m({},e))}),(0,n.jsxs)("td",{className:"product-subtotal",children:[(0,n.jsxs)("span",{className:"subtotal-amount",children:["$",(e.quantity*e.price).toFixed(2)]}),(0,n.jsx)("a",{href:"#",className:"remove",onClick:function(){var n;n=e.id,t({type:"REMOVE_ITEM",id:n}),r("Cart Removed Successfully",{appearance:"error"})},children:(0,n.jsx)(a.Z,{})})]})]},e.id)})):(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:"5",className:"text-center",children:"Empty"})})})]})}),(0,n.jsx)("div",{className:"cart-buttons",children:(0,n.jsxs)("div",{className:"row align-items-center",children:[(0,n.jsx)("div",{className:"col-lg-7 col-md-7 col-sm-7",children:(0,n.jsx)("div",{className:"continue-shopping-box",children:(0,n.jsx)("a",{href:"#",className:"btn btn-light",children:"Continue Shopping"})})}),(0,n.jsx)("div",{className:"col-lg-5 col-md-5 col-sm-5 text-right",children:(0,n.jsx)(l.default,{href:"/cart",children:(0,n.jsx)("a",{className:"btn btn-light",children:"Update Cart"})})})]})}),(0,n.jsxs)("div",{className:"cart-totals",children:[(0,n.jsx)("h3",{children:"Cart Totals"}),(0,n.jsxs)("ul",{children:[(0,n.jsxs)("li",{children:["Subtotal ",(0,n.jsxs)("span",{children:["$",i.toFixed(2)]})]}),(0,n.jsxs)("li",{children:["Shipping ",(0,n.jsx)("span",{children:"$10.00"})]}),(0,n.jsxs)("li",{children:["Total ",(0,n.jsx)("span",{children:(0,n.jsxs)("b",{children:["$",(i+10).toFixed(2)]})})]})]}),(0,n.jsx)(l.default,{href:"#",children:(0,n.jsx)("a",{onClick:function(n){n.preventDefault(),t({type:"RESET"}),r("Thanks for your order.",{appearance:"success"}),e.push("/")},className:"btn btn-primary",children:"Proceed to Checkout"})})]})]})},y=function(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.Z,{}),(0,n.jsx)(c.Z,{pageTitle:"Cart"}),(0,n.jsx)("div",{className:"cart-area ptb-80",children:(0,n.jsx)("div",{className:"container",children:(0,n.jsx)("div",{className:"row",children:(0,n.jsx)("div",{className:"col-lg-12 col-md-12",children:(0,n.jsx)(v,{})})})})}),(0,n.jsx)(i.Z,{})]})}},54701:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/cart",function(){return t(59496)}])},20210:function(e,r,t){"use strict";var n=t(67294),s=t(45697),i=t.n(s);function c(){return(c=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function o(e,r){if(null==e)return{};var t,n,s=function(e,r){if(null==e)return{};var t,n,s={},i=Object.keys(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||(s[t]=e[t]);return s}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}var l=(0,n.forwardRef)((function(e,r){var t=e.color,s=void 0===t?"currentColor":t,i=e.size,l=void 0===i?24:i,a=o(e,["color","size"]);return n.createElement("svg",c({ref:r,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a),n.createElement("line",{x1:"5",y1:"12",x2:"19",y2:"12"}))}));l.propTypes={color:i().string,size:i().oneOfType([i().string,i().number])},l.displayName="Minus",r.Z=l},61896:function(e,r,t){"use strict";var n=t(67294),s=t(45697),i=t.n(s);function c(){return(c=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function o(e,r){if(null==e)return{};var t,n,s=function(e,r){if(null==e)return{};var t,n,s={},i=Object.keys(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||(s[t]=e[t]);return s}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}var l=(0,n.forwardRef)((function(e,r){var t=e.color,s=void 0===t?"currentColor":t,i=e.size,l=void 0===i?24:i,a=o(e,["color","size"]);return n.createElement("svg",c({ref:r,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a),n.createElement("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),n.createElement("line",{x1:"5",y1:"12",x2:"19",y2:"12"}))}));l.propTypes={color:i().string,size:i().oneOfType([i().string,i().number])},l.displayName="Plus",r.Z=l},73549:function(e,r,t){"use strict";var n=t(67294),s=t(45697),i=t.n(s);function c(){return(c=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function o(e,r){if(null==e)return{};var t,n,s=function(e,r){if(null==e)return{};var t,n,s={},i=Object.keys(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||(s[t]=e[t]);return s}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}var l=(0,n.forwardRef)((function(e,r){var t=e.color,s=void 0===t?"currentColor":t,i=e.size,l=void 0===i?24:i,a=o(e,["color","size"]);return n.createElement("svg",c({ref:r,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a),n.createElement("circle",{cx:"9",cy:"21",r:"1"}),n.createElement("circle",{cx:"20",cy:"21",r:"1"}),n.createElement("path",{d:"M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"}))}));l.propTypes={color:i().string,size:i().oneOfType([i().string,i().number])},l.displayName="ShoppingCart",r.Z=l},30833:function(e,r,t){"use strict";var n=t(67294),s=t(45697),i=t.n(s);function c(){return(c=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function o(e,r){if(null==e)return{};var t,n,s=function(e,r){if(null==e)return{};var t,n,s={},i=Object.keys(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||(s[t]=e[t]);return s}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}var l=(0,n.forwardRef)((function(e,r){var t=e.color,s=void 0===t?"currentColor":t,i=e.size,l=void 0===i?24:i,a=o(e,["color","size"]);return n.createElement("svg",c({ref:r,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},a),n.createElement("polyline",{points:"3 6 5 6 21 6"}),n.createElement("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}),n.createElement("line",{x1:"10",y1:"11",x2:"10",y2:"17"}),n.createElement("line",{x1:"14",y1:"11",x2:"14",y2:"17"}))}));l.propTypes={color:i().string,size:i().oneOfType([i().string,i().number])},l.displayName="Trash2",r.Z=l}},function(e){e.O(0,[3023,8206,9774,2888,179],(function(){return r=54701,e(e.s=r);var r}));var r=e.O();_N_E=r}]);
  2. //# sourceMappingURL=cart-6b1169b684bc471e6256.js.map