Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 

1 rinda
3.5 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\"; // nodejs library that concatenates classes\n\nimport classNames from \"classnames\"; // react components for routing our app without refresh\n\nimport Link from \"next/link\"; // @material-ui/core components\n\nimport { makeStyles } from \"@material-ui/core/styles\"; // @material-ui/icons\n// core components\n\nimport Header from \"components/Header/Header.js\";\nimport HeaderLinks from \"components/Header/HeaderLinks.js\";\nimport Footer from \"components/Footer/Footer.js\";\nimport GridContainer from \"components/Grid/GridContainer.js\";\nimport GridItem from \"components/Grid/GridItem.js\";\nimport AboutUs from \"pages-sections/yamaha/about_us/about_us.js\";\nimport Parallax from \"components/Parallax/Parallax.js\";\nimport styles from \"assets/jss/nextjs-material-kit/pages/components.js\";\nimport Cookies from \"cookies\";\nconst useStyles = makeStyles(styles);\n\nconst AboutUS = function (_ref) {\n let {\n user\n } = _ref,\n props = _objectWithoutProperties(_ref, [\"user\"]);\n\n const classes = useStyles();\n const rest = Object.assign({}, props);\n return __jsx(\"div\", null, __jsx(Header, _extends({\n leftLinks: __jsx(HeaderLinks, {\n username: user\n }),\n fixed: true,\n color: \"info\",\n changeColorOnScroll: {\n height: 400,\n color: \"white\"\n }\n }, rest)), __jsx(Parallax, {\n image: require(\"assets/img/aboutus.jpg\"),\n width: \"200px\"\n }, __jsx(\"div\", {\n className: classes.container\n }, __jsx(GridContainer, null, __jsx(GridItem, null)))), __jsx(\"div\", {\n className: classNames(classes.main, classes.mainRaised)\n }, __jsx(AboutUs, null)), __jsx(Footer, null));\n};\n\nexport async function getServerSideProps(context) {\n var {\n req,\n resp\n } = context;\n const cookies = new Cookies(req, resp);\n var user = \"\";\n var userObj = (await cookies.get(\"user\")) ? JSON.parse(await cookies.get(\"user\")) : null;\n\n if (userObj) {\n let sessionId = userObj[\"partners_login_states\"].filter(function (i) {\n return i.business_partner && i.business_partner.name.toUpperCase() == \"YAMAHA\";\n });\n if (sessionId.length != 0) user = userObj[\"username\"];\n }\n\n return {\n props: {\n user\n } // will be passed to the page component as props\n\n };\n}\nexport default AboutUS;","map":null,"metadata":{},"sourceType":"module"}