Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 

361 linhas
15 KiB

  1. import React from "react";
  2. import classNames from "classnames";
  3. import { makeStyles } from "@material-ui/core/styles";
  4. import Select from 'react-select';
  5. import Button from "components/CustomButtons/Button.js";
  6. import Icon from "@material-ui/core/Icon";
  7. import styles from "assets/jss/nextjs-material-kit/pages/componentsSections/notificationsStyles.js";
  8. import Card from "components/Card/Card.js";
  9. import CardBody from "components/Card/CardBody.js";
  10. import GridContainer from "components/Grid/GridContainer.js";
  11. import SnackbarContent from "components/Snackbar/SnackbarContent.js";
  12. import { MoveToInboxOutlined } from "@material-ui/icons";
  13. const useStyles = makeStyles(styles);
  14. const DataHelmet = function ({ selected, handleName, backend, helmet, mtx, extreme, ranger, fighter, swirl, classic, uno, ...props }) {
  15. const classes = useStyles();
  16. const { ...rest } = props;
  17. const imageClasses = classNames(
  18. classes.imgRaised,
  19. classes.imgRoundedCircle,
  20. classes.imgFluid
  21. );
  22. const navImageClasses = classNames(classes.imgRounded, classes.imgGallery);
  23. const ProductHelmetRConcepts = helmet.map((data) => {
  24. return (
  25. <div style={{padding: "20px", marginTop:"-40px"}}>
  26. <Card className={classes.textCenter} align="center" style={{width:"300px"}}>
  27. <CardBody>
  28. <div align="center" style={{padding:"10px"}}>
  29. <img style={{ width: "200px", display: "block" }} src={`${backend}${data.img["url"]}`} className={navImageClasses}
  30. />
  31. <div align="center">
  32. <h5>{data.name}</h5>
  33. <h5>Rp.{data.price}</h5>
  34. <Button
  35. color="info" round
  36. href={"/yamaha/product/helmet_details?s="+data.id}
  37. >
  38. <Icon className={classes.icons}>open_in_new</Icon>Detail Product
  39. </Button>
  40. </div>
  41. </div>
  42. </CardBody>
  43. </Card>
  44. </div>
  45. );
  46. })
  47. const ProductHelmetMTX = mtx.map((data) => {
  48. return (
  49. <div style={{padding: "20px", marginTop:"-40px"}}>
  50. <Card className={classes.textCenter} align="center" style={{width:"300px"}}>
  51. <CardBody>
  52. <div align="center" style={{padding:"10px"}}>
  53. <img style={{ width: "200px", display: "block" }} src={`${backend}${data.img["url"]}`} className={navImageClasses}
  54. />
  55. <div align="center">
  56. <h5>{data.name}</h5>
  57. <h5>Rp.{data.price}</h5>
  58. <Button
  59. color="info" round
  60. href={"/yamaha/product/helmet_details?s="+data.id}
  61. >
  62. <Icon className={classes.icons}>open_in_new</Icon>Detail Product
  63. </Button>
  64. </div>
  65. </div>
  66. </CardBody>
  67. </Card>
  68. </div>
  69. );
  70. })
  71. const ProductHelmetExtreme = extreme.map((data) => {
  72. return (
  73. <div style={{padding: "20px", marginTop:"-40px"}}>
  74. <Card className={classes.textCenter} align="center" style={{width:"300px"}}>
  75. <CardBody>
  76. <div align="center" style={{padding:"10px"}}>
  77. <img style={{ width: "200px", display: "block" }} src={`${backend}${data.img["url"]}`} className={navImageClasses}
  78. />
  79. <div align="center">
  80. <h5>{data.name}</h5>
  81. <h5>Rp.{data.price}</h5>
  82. <Button
  83. color="info" round
  84. href={"/yamaha/product/helmet_details?s="+data.id}
  85. >
  86. <Icon className={classes.icons}>open_in_new</Icon>Detail Product
  87. </Button>
  88. </div>
  89. </div>
  90. </CardBody>
  91. </Card>
  92. </div>
  93. );
  94. })
  95. const ProductHelmetRanger = ranger.map((data) => {
  96. return (
  97. <div style={{padding: "20px", marginTop:"-40px"}}>
  98. <Card className={classes.textCenter} align="center" style={{width:"300px"}}>
  99. <CardBody>
  100. <div align="center" style={{padding:"10px"}}>
  101. <img style={{ width: "200px", display: "block" }} src={`${backend}${data.img["url"]}`} className={navImageClasses}
  102. />
  103. <div align="center">
  104. <h5>{data.name}</h5>
  105. <h5>Rp.{data.price}</h5>
  106. <Button
  107. color="info" round
  108. href={"/yamaha/product/helmet_details?s="+data.id}
  109. >
  110. <Icon className={classes.icons}>open_in_new</Icon>Detail Product
  111. </Button>
  112. </div>
  113. </div>
  114. </CardBody>
  115. </Card>
  116. </div>
  117. );
  118. })
  119. const ProductHelmetFighter = fighter.map((data) => {
  120. return (
  121. <div style={{padding: "20px", marginTop:"-40px"}}>
  122. <Card className={classes.textCenter} align="center" style={{width:"300px"}}>
  123. <CardBody>
  124. <div align="center" style={{padding:"10px"}}>
  125. <img style={{ width: "200px", display: "block" }} src={`${backend}${data.img["url"]}`} className={navImageClasses}
  126. />
  127. <div align="center">
  128. <h5>{data.name}</h5>
  129. <h5>Rp.{data.price}</h5>
  130. <Button
  131. color="info" round
  132. href={"/yamaha/product/helmet_details?s="+data.id}
  133. >
  134. <Icon className={classes.icons}>open_in_new</Icon>Detail Product
  135. </Button>
  136. </div>
  137. </div>
  138. </CardBody>
  139. </Card>
  140. </div>
  141. );
  142. })
  143. const ProductHelmetSwirl = swirl.map((data) => {
  144. return (
  145. <div style={{padding: "20px", marginTop:"-40px"}}>
  146. <Card className={classes.textCenter} align="center" style={{width:"300px"}}>
  147. <CardBody>
  148. <div align="center" style={{padding:"10px"}}>
  149. <img style={{ width: "200px", display: "block" }} src={`${backend}${data.img["url"]}`} className={navImageClasses}
  150. />
  151. <div align="center">
  152. <h5>{data.name}</h5>
  153. <h5>Rp.{data.price}</h5>
  154. <Button
  155. color="info" round
  156. href={"/yamaha/product/helmet_details?s="+data.id}
  157. >
  158. <Icon className={classes.icons}>open_in_new</Icon>Detail Product
  159. </Button>
  160. </div>
  161. </div>
  162. </CardBody>
  163. </Card>
  164. </div>
  165. );
  166. })
  167. const ProductHelmetClassic = classic.map((data) => {
  168. return (
  169. <div style={{padding: "20px", marginTop:"-40px"}}>
  170. <Card className={classes.textCenter} align="center" style={{width:"300px"}}>
  171. <CardBody>
  172. <div align="center" style={{padding:"10px"}}>
  173. <img style={{ width: "200px", height:"200px", display: "block" }} src={`${backend}${data.img["url"]}`} className={navImageClasses}
  174. />
  175. <div align="center">
  176. <h5>{data.name}</h5>
  177. <h5>Rp.{data.price}</h5>
  178. <Button
  179. color="info" round
  180. href={"/yamaha/product/helmet_details?s="+data.id}
  181. >
  182. <Icon className={classes.icons}>open_in_new</Icon>Detail Product
  183. </Button>
  184. </div>
  185. </div>
  186. </CardBody>
  187. </Card>
  188. </div>
  189. );
  190. })
  191. const ProductHelmetUno = uno.map((data) => {
  192. return (
  193. <div style={{padding: "20px", marginTop:"-40px"}}>
  194. <Card className={classes.textCenter} align="center" style={{width:"300px"}}>
  195. <CardBody>
  196. <div align="center" style={{padding:"10px"}}>
  197. <img style={{ width: "200px", display: "block" }} src={`${backend}${data.img["url"]}`} className={navImageClasses}
  198. />
  199. <div align="center">
  200. <h5>{data.name}</h5>
  201. <h5>Rp.{data.price}</h5>
  202. <Button
  203. color="info" round
  204. href={"/yamaha/product/helmet_details?s="+data.id}
  205. >
  206. <Icon className={classes.icons}>open_in_new</Icon>Detail Product
  207. </Button>
  208. </div>
  209. </div>
  210. </CardBody>
  211. </Card>
  212. </div>
  213. );
  214. })
  215. return (
  216. <div>
  217. <Card className={classes.textCenter} style={{padding:"5px"}}>
  218. <CardBody>
  219. {/* <div align="center" style={{marginTop:"-50px"}}>
  220. <h2>Yamaha Helmet</h2>
  221. <Select
  222. value={(selected)?helmet.filter((i)=>i.id==selected):null}
  223. getOptionLabel={option => `${option.name}`}
  224. getOptionValue={option => option.id}
  225. options={helmet}
  226. options={mtx}
  227. options={extreme}
  228. options={ranger}
  229. options={fighter}
  230. options={swirl}
  231. options={classic}
  232. options={uno}
  233. isMulti
  234. instanceId="name"
  235. placeholder="Search"
  236. onChange={values => handleName(values)}
  237. />
  238. <br></br><br></br><br></br>
  239. </div> */}
  240. <div align="center">
  241. <div align="center" className={classes.section} id="notifications">
  242. <SnackbarContent
  243. message={
  244. <h4>R CONCEPT</h4>
  245. }
  246. align="center"
  247. color="danger"
  248. />
  249. </div>
  250. <GridContainer justify="center" style={{padding:"40px", marginTop:"-50px"}}>
  251. {ProductHelmetRConcepts}
  252. </GridContainer>
  253. </div><br></br><br></br>
  254. <div align="center" style={{marginTop:"-50px"}}>
  255. <div align="center" className={classes.section} id="notifications">
  256. <SnackbarContent
  257. message={
  258. <h4>MTX</h4>
  259. }
  260. align="center"
  261. color="danger"
  262. />
  263. </div>
  264. <GridContainer justify="center" style={{padding:"40px", marginTop:"-50px"}}>
  265. {ProductHelmetMTX}
  266. </GridContainer>
  267. </div><br></br><br></br>
  268. <div align="center" style={{marginTop:"-50px"}}>
  269. <div align="center" className={classes.section} id="notifications">
  270. <SnackbarContent
  271. message={
  272. <h4>EXTREME</h4>
  273. }
  274. align="center"
  275. color="danger"
  276. />
  277. </div>
  278. <GridContainer justify="center" style={{padding:"40px", marginTop:"-50px"}}>
  279. {ProductHelmetExtreme}
  280. </GridContainer>
  281. </div><br></br><br></br>
  282. <div align="center" style={{marginTop:"-50px"}}>
  283. <div align="center" className={classes.section} id="notifications">
  284. <SnackbarContent
  285. message={
  286. <h4>RANGER</h4>
  287. }
  288. align="center"
  289. color="danger"
  290. />
  291. </div>
  292. <GridContainer justify="center" style={{padding:"40px", marginTop:"-50px"}}>
  293. {ProductHelmetRanger}
  294. </GridContainer>
  295. </div><br></br><br></br>
  296. <div align="center" style={{marginTop:"-50px"}}>
  297. <div align="center" className={classes.section} id="notifications">
  298. <SnackbarContent
  299. message={
  300. <h4>FIGHTER</h4>
  301. }
  302. align="center"
  303. color="danger"
  304. />
  305. </div>
  306. <GridContainer justify="center" style={{padding:"40px", marginTop:"-50px"}}>
  307. {ProductHelmetFighter}
  308. </GridContainer>
  309. </div><br></br><br></br>
  310. <div align="center" style={{marginTop:"-50px"}}>
  311. <div align="center" className={classes.section} id="notifications">
  312. <SnackbarContent
  313. message={
  314. <h4>SWIRL</h4>
  315. }
  316. align="center"
  317. color="danger"
  318. />
  319. </div>
  320. <GridContainer justify="center" style={{padding:"40px", marginTop:"-50px"}}>
  321. {ProductHelmetSwirl}
  322. </GridContainer>
  323. </div><br></br><br></br>
  324. <div align="center" style={{marginTop:"-50px"}}>
  325. <div align="center" className={classes.section} id="notifications">
  326. <SnackbarContent
  327. message={
  328. <h4>CLASSIC</h4>
  329. }
  330. align="center"
  331. color="danger"
  332. />
  333. </div>
  334. <GridContainer justify="center" style={{padding:"40px", marginTop:"-50px"}}>
  335. {ProductHelmetClassic}
  336. </GridContainer>
  337. </div><br></br><br></br>
  338. <div align="center" style={{marginTop:"-50px"}}>
  339. <div align="center" className={classes.section} id="notifications">
  340. <SnackbarContent
  341. message={
  342. <h4>UNO</h4>
  343. }
  344. align="center"
  345. color="danger"
  346. />
  347. </div>
  348. <GridContainer justify="center" style={{padding:"40px", marginTop:"-50px"}}>
  349. {ProductHelmetUno}
  350. </GridContainer>
  351. </div><br></br><br></br>
  352. </CardBody>
  353. </Card>
  354. </div>
  355. );
  356. }
  357. export default DataHelmet;