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
4.3 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\nimport React, { useState, useEffect } from \"react\";\nimport ReactHtmlParser from \"react-html-parser\"; // @material-ui/core components\n\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport ReactPaginate from \"react-paginate\";\nimport classNames from \"classnames\";\nimport GridContainer from \"components/Grid/GridContainer.js\";\nimport Grid from '@material-ui/core/Grid';\nimport GridItem from \"components/Grid/GridItem.js\";\nimport Card from \"components/Card/Card.js\";\nimport Carousel from \"react-slick\";\nimport CardBody from \"components/Card/CardBody.js\";\nimport Button from \"components/CustomButtons/Button.js\";\nimport Icon from \"@material-ui/core/Icon\";\nimport styles from \"assets/jss/nextjs-material-kit/pages/componentsSections/notificationsStyles.js\";\nconst useStyles = makeStyles(styles);\n\nconst DataLatestNews = function (_ref) {\n let {\n backend,\n news,\n othernews\n } = _ref,\n props = _objectWithoutProperties(_ref, [\"backend\", \"news\", \"othernews\"]);\n\n const classes = useStyles();\n const imageClasses = classNames(classes.imgRaised, classes.imgRoundedCircle, classes.imgFluid);\n const settings = {\n dots: true,\n infinite: true,\n speed: 500,\n slidesToShow: 1,\n slidesToScroll: 1,\n autoplay: true,\n time: 5\n };\n const navImageClasses = classNames(classes.imgRounded, classes.imgGallery);\n const otherlatnews = othernews.map(data => {\n return __jsx(Grid, {\n align: \"center\",\n style: {\n padding: \"5px\",\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(Button, {\n color: \"info\",\n round: true,\n href: \"/latestnews_details?s=\" + data.id\n }, __jsx(Icon, {\n className: classes.icons\n }, \"open_in_new\"), \"Read More\"))));\n });\n const latnews = news.map(data => {\n return __jsx(GridContainer, {\n justify: \"center\"\n }, __jsx(Grid, {\n fluid: true,\n xs: 4\n }, __jsx(\"div\", {\n className: classes.section,\n id: \"notifications\"\n }, __jsx(\"div\", {\n className: classes.section\n }, __jsx(\"div\", {\n className: classes.container\n }, __jsx(GridContainer, null, __jsx(GridItem, {\n className: classes.marginAuto\n }, __jsx(Card, {\n carousel: true\n }, __jsx(Carousel, settings, __jsx(\"img\", {\n className: navImageClasses,\n width: \"300px\",\n alt: \"First slide\",\n src: `${backend}${data.img[0][\"url\"]}`\n }))))))))), __jsx(Grid, {\n xs: 7,\n style: {\n padding: \"40px\",\n marginTop: \"-30px\"\n }\n }, __jsx(\"h4\", null, data.title), __jsx(\"h4\", null, data.published_at), __jsx(\"hr\", null), __jsx(\"div\", {\n align: \"justify\"\n }, __jsx(\"p\", null, ReactHtmlParser(data.description)))));\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(GridContainer, {\n justify: \"center\"\n }, latnews)));\n};\n\nexport default DataLatestNews;","map":null,"metadata":{},"sourceType":"module"}