25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

1 satır
6.7 KiB

  1. {"ast":null,"code":"var __jsx = React.createElement;\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\n/*eslint-disable*/\nimport React from \"react\";\nimport Link from \"next/link\"; // @material-ui/core components\n\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport List from \"@material-ui/core/List\";\nimport ListItem from \"@material-ui/core/ListItem\";\nimport Icon from \"@material-ui/core/Icon\"; // import People from \"@material-ui/core/People\";\n\nimport Chart from \"@material-ui/icons/LocalGroceryStore\"; // @material-ui/icons\n\nimport { Apps, ShareTwoTone, Person } from \"@material-ui/icons\"; // core components\n\nimport CustomDropdown from \"components/CustomDropdown/CustomDropdown.js\";\nimport Button from \"components/CustomButtons/Button.js\";\nimport styles from \"assets/jss/nextjs-material-kit/components/headerLinksStyle.js\";\nimport Logo from \"assets/img/tb.png\";\nconst useStyles = makeStyles(styles);\nexport default function HeaderLinks(_ref) {\n let {\n username\n } = _ref,\n props = _objectWithoutProperties(_ref, [\"username\"]);\n\n const classes = useStyles();\n return __jsx(List, {\n className: classes.list\n }, __jsx(ListItem, {\n className: classes.listItem\n }, __jsx(Link, {\n href: \"/yamaha/home\"\n }, __jsx(Button, {\n color: \"transparent\",\n className: classes.navLink\n }, __jsx(\"img\", {\n src: Logo,\n width: \"180px\"\n })))), __jsx(ListItem, {\n className: classes.listItem\n }, __jsx(Link, {\n href: \"/yamaha/home\"\n }, __jsx(Button, {\n color: \"transparent\",\n className: classes.navLink,\n style: {\n marginTop: \"10px\"\n }\n }, __jsx(Icon, {\n className: classes.icons\n }, \"home\"), \" Home\"))), __jsx(ListItem, {\n className: classes.listItem,\n style: {\n marginTop: \"10px\"\n }\n }, __jsx(CustomDropdown, {\n noLiPadding: true,\n navDropdown: true,\n buttonText: \"Product\",\n buttonProps: {\n className: classes.navLink,\n color: \"transparent\"\n },\n buttonIcon: Apps,\n dropdownList: [__jsx(\"a\", {\n href: \"/yamaha/product/product\",\n className: classes.dropdownLink\n }, \"Motor\"), __jsx(\"a\", {\n href: \"/yamaha/sparepart/sparepart\",\n className: classes.dropdownLink\n }, \"Sparepart & Accessories\"), // <a href=\"/yamaha/product/yamalube\" className={classes.dropdownLink}>\n // Yamalube\n // </a>,\n // <a href=\"/yamaha/product/helmet\" className={classes.dropdownLink}>\n // Helmet\n // </a>,\n // <a href=\"/yamaha/product/apparel\" className={classes.dropdownLink}>\n // Apparel\n // </a>,\n // <a\n // href=\"/yamaha/product/accessories\"\n // className={classes.dropdownLink}\n // >\n // Accessories\n // </a>,\n __jsx(\"a\", {\n href: \"https://booking.thamrin.co.id/\",\n className: classes.dropdownLink\n }, \"Service\"), __jsx(\"a\", {\n href: \"/yamaha/dealers\",\n className: classes.dropdownLink\n }, \"Dealers\") // <a href=\"/yamaha/order/order\" className={classes.dropdownLink}>\n // Dealers\n // </a>,\n ]\n })), __jsx(ListItem, {\n className: classes.listItem,\n style: {\n marginTop: \"10px\"\n }\n }, __jsx(Link, {\n href: \"/yamaha/latest_news/latestnews\"\n }, __jsx(Button, {\n color: \"transparent\",\n className: classes.navLink\n }, __jsx(Icon, {\n className: classes.icons\n }, \"event\"), \" Latest News\"))), __jsx(ListItem, {\n className: classes.listItem,\n style: {\n marginTop: \"10px\"\n }\n }, __jsx(Button, {\n href: \"/yamaha/carrer/carrer\",\n color: \"transparent\",\n className: classes.navLink\n }, __jsx(Icon, {\n className: classes.icons\n }, \"wallet_travel\"), \" Career\")), __jsx(ListItem, {\n className: classes.listItem,\n style: {\n marginTop: \"10px\"\n }\n }, __jsx(Button, {\n href: \"/yamaha/abous_us/aboutus\",\n color: \"transparent\",\n className: classes.navLink\n }, __jsx(Icon, {\n className: classes.icons\n }, \"account_balance\"), \" About Us\")), __jsx(ListItem, {\n className: classes.listItem,\n style: {\n marginTop: \"10px\"\n }\n }, !username || username == \"\" ? __jsx(Button, {\n href: \"/yamaha/login\",\n className: classes.registerNavLink,\n color: \"info\",\n round: true\n }, __jsx(Icon, {\n className: classes.icons\n }, \"input\"), \" Login\") : __jsx(CustomDropdown, {\n noLiPadding: true,\n navDropdown: true,\n buttonText: username.length > 12 ? username.substring(0, 9) + \"..\" : username,\n buttonProps: {\n className: classes.navLink,\n color: \"transparent\"\n },\n buttonIcon: Person,\n dropdownList: [__jsx(\"div\", {\n onClick: async e => {\n e.preventDefault();\n fetch(\"/api/auth/logout\", {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify({\n p: \"YAMAHA\"\n })\n }).then(res => {\n //if (res.ok) {\n window.location.href = \"../yamaha/home\";\n /*}\r\n else{\r\n }*/\n });\n }\n }, __jsx(\"a\", {\n className: classes.dropdownLink\n }, __jsx(Icon, {\n className: classes.icons\n }, \"exit_to_app\"), \" Logout\")), __jsx(\"div\", null, __jsx(\"a\", {\n className: classes.dropdownLink,\n href: \"/yamaha/profile/profile\"\n }, __jsx(Icon, {\n className: classes.icons\n }, \"people\"), \" Profile\")), __jsx(\"div\", null, __jsx(\"a\", {\n className: classes.dropdownLink,\n href: \"/yamaha/order/order\"\n }, __jsx(Icon, {\n className: classes.icons\n }, \"shopping_cart\"), \" Pesanan Saya\")) // <a href=\"/yamaha/profile/profile\" className={classes.dropdownLink}>Profile</a>,\n ]\n })));\n}","map":null,"metadata":{},"sourceType":"module"}