Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1 строка
3.0 KiB

  1. {"ast":null,"code":"var __jsx = React.createElement;\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\nimport classNames from \"classnames\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Header from \"components/Header/Header.js\";\nimport HeaderLinks from \"components/Header/HeaderLinks.js\";\nimport Footer from \"components/Footer/Footer.js\";\nimport Cart from \"pages-sections/yamaha/cart/cart.js\";\nimport Parallax from \"components/Parallax/Parallax.js\";\nimport styles from \"assets/jss/nextjs-material-kit/pages/components.js\";\nimport GetCartproduct from \"../../../api/cart/cart.js\";\nconst useStyles = makeStyles(styles);\n\nconst ProductDetails = function (_ref) {\n let {\n backend,\n cartproduct\n } = _ref,\n props = _objectWithoutProperties(_ref, [\"backend\", \"cartproduct\"]);\n\n const classes = useStyles();\n const rest = Object.assign({}, props);\n return __jsx(\"div\", null, __jsx(Header, _extends({\n rightLinks: __jsx(HeaderLinks, null),\n fixed: true,\n color: \"info\",\n changeColorOnScroll: {\n height: 400,\n color: \"white\"\n }\n }, rest)), __jsx(Parallax, {\n image: require(\"assets/img/Promotion_2-1.jpg\"),\n width: \"200px\"\n }), __jsx(\"div\", {\n className: classNames(classes.main, classes.mainRaised)\n }, __jsx(Cart, {\n cartproduct: cartproduct,\n backend: backend\n })), __jsx(Footer, null));\n};\n\nexport default ProductDetails;\nexport async function getServerSideProps(context) {\n var {\n query\n } = context;\n var cartproduct = [];\n const backend = process.env.BACKEND_SERVER_URI;\n var res = await GetCartproduct.GetCartProduct(query.s || 0);\n\n if (res[\"STATUS\"] === 1) {\n cartproduct = res[\"DATA\"][\"products\"];\n }\n\n return {\n props: {\n cartproduct,\n backend\n } // will be passed to the page component as props\n\n };\n}","map":null,"metadata":{},"sourceType":"module"}