{"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\nimport React from 'react';\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport styles from \"assets/jss/nextjs-material-kit/pages/componentsSections/notificationsStyles.js\";\nimport Grid from '@material-ui/core/Grid';\nimport GridContainer from \"components/Grid/GridContainer.js\";\nimport Card from \"components/Card/Card.js\";\nimport CardBody from \"components/Card/CardBody.js\";\nimport Button from \"components/CustomButtons/Button.js\";\nimport Paginations from \"components/Pagination/Pagination.js\";\nimport Icon from \"@material-ui/core/Icon\";\nimport CardHeader from \"components/Card/CardHeader.js\";\nconst useStyles = makeStyles(styles);\n\nconst DataLatestNews = function (_ref) {\n let {\n backend,\n news\n } = _ref,\n props = _objectWithoutProperties(_ref, [\"backend\", \"news\"]);\n\n const classes = useStyles();\n const latnews = news.map(data => {\n return __jsx(Grid, {\n align: \"center\",\n style: {\n padding: \"30px\",\n marginTop: \"-50px\"\n }\n }, __jsx(Card, {\n style: {\n width: \"20rem\"\n }\n }, __jsx(\"img\", {\n style: {\n height: \"180px\",\n width: \"100%\",\n display: \"block\"\n },\n className: classes.imgCardTop,\n src: `${backend}${data.img[0][\"url\"]}`\n }), __jsx(CardBody, null, __jsx(\"p\", null, data.title), __jsx(\"p\", null, data.published_at), __jsx(Button, {\n color: \"info\",\n round: true,\n href: \"/hino/latest_news/latestnews_details?s=\" + data.id\n }, __jsx(Icon, {\n className: classes.icons\n }, \"open_in_new\"), \"Read More\"))));\n });\n return __jsx(Card, {\n className: classes.textCenter\n }, __jsx(\"div\", {\n align: \"center\"\n }, __jsx(CardHeader, {\n color: \"info\"\n }, \"News\")), __jsx(CardBody, null, __jsx(\"div\", {\n align: \"center\"\n }, __jsx(\"h2\", null, \"Latest News\")), __jsx(GridContainer, {\n justify: \"center\"\n }, latnews)), __jsx(\"div\", {\n align: \"center\"\n }, __jsx(Paginations, {\n pages: [{\n text: \"PREV\"\n }, {\n text: 1\n }, {\n text: 2\n }, {\n active: true,\n text: 3\n }, {\n text: 4\n }, {\n text: 5\n }, {\n text: \"NEXT\"\n }],\n color: \"info\"\n })));\n};\n\nexport default DataLatestNews;","map":null,"metadata":{},"sourceType":"module"}