|
- (function() {
- var exports = {};
- exports.id = 6950;
- exports.ids = [6950];
- exports.modules = {
-
- /***/ 1288:
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5282);
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9297);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
-
-
-
- const PageBanner = ({
- pageTitle
- }) => {
- return /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
- className: "page-title-area",
- children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
- className: "d-table",
- children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
- className: "d-table-cell",
- children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", {
- className: "container",
- children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("h2", {
- children: pageTitle
- })
- })
- })
- })
- });
- };
-
- /* harmony default export */ __webpack_exports__["Z"] = (PageBanner);
-
- /***/ }),
-
- /***/ 9838:
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- // ESM COMPAT FLAG
- __webpack_require__.r(__webpack_exports__);
-
- // EXPORTS
- __webpack_require__.d(__webpack_exports__, {
- "default": function() { return /* binding */ yamaha_LatestNews; },
- "getServerSideProps": function() { return /* binding */ getServerSideProps; }
- });
-
- // EXTERNAL MODULE: external "react/jsx-runtime"
- var jsx_runtime_ = __webpack_require__(5282);
- // EXTERNAL MODULE: external "react"
- var external_react_ = __webpack_require__(9297);
- // EXTERNAL MODULE: ./components/_App/NavbarYamaha.js
- var NavbarYamaha = __webpack_require__(2478);
- // EXTERNAL MODULE: ./components/_App/FooterYamaha.js
- var FooterYamaha = __webpack_require__(362);
- // EXTERNAL MODULE: ./components/Common/PageBanner.js
- var PageBanner = __webpack_require__(1288);
- // EXTERNAL MODULE: external "react-feather"
- var external_react_feather_ = __webpack_require__(9337);
- // EXTERNAL MODULE: ./node_modules/next/link.js
- var next_link = __webpack_require__(1664);
- ;// CONCATENATED MODULE: ./components/Yamaha/LatestNews/LatestNews.js
-
-
-
-
- function _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; }
-
- function _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; }
-
-
-
-
-
- const News = function (_ref) {
- let {
- backend,
- news,
- othernews
- } = _ref,
- props = _objectWithoutProperties(_ref, ["backend", "news", "othernews"]);
-
- const NewsList = news.map(data => {
- return /*#__PURE__*/jsx_runtime_.jsx(jsx_runtime_.Fragment, {
- children: /*#__PURE__*/jsx_runtime_.jsx("div", {
- className: "col-lg-6 col-md-6",
- children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
- className: "single-blog-post",
- children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
- className: "blog-image",
- children: [/*#__PURE__*/jsx_runtime_.jsx(next_link.default, {
- href: "/blog-details",
- children: /*#__PURE__*/jsx_runtime_.jsx("a", {
- children: /*#__PURE__*/jsx_runtime_.jsx("img", {
- src: `${backend}${data.img[0]["url"]}`
- })
- })
- }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
- className: "date",
- children: [/*#__PURE__*/jsx_runtime_.jsx(external_react_feather_.Calendar, {}), " ", data.published_at]
- })]
- }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
- className: "blog-post-content",
- children: [/*#__PURE__*/jsx_runtime_.jsx("h3", {
- children: /*#__PURE__*/jsx_runtime_.jsx(next_link.default, {
- href: "/yamaha/LatestNews/LatestNewsDetail?s=" + data.id,
- children: /*#__PURE__*/jsx_runtime_.jsx("a", {
- children: data.title
- })
- })
- }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("span", {
- children: ["By ", /*#__PURE__*/jsx_runtime_.jsx("a", {
- href: "#",
- children: "Admin"
- })]
- }), /*#__PURE__*/jsx_runtime_.jsx(next_link.default, {
- href: "/yamaha/LatestNews/LatestNewsDetail?s=" + data.id,
- children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("a", {
- className: "read-more-btn",
- children: ["Read More ", /*#__PURE__*/jsx_runtime_.jsx(external_react_feather_.ArrowRight, {})]
- })
- })]
- })]
- })
- })
- });
- });
- const PopularNews = othernews.map(data => {
- return /*#__PURE__*/(0,jsx_runtime_.jsxs)("article", {
- className: "item",
- children: [/*#__PURE__*/jsx_runtime_.jsx(next_link.default, {
- href: "/blog-details",
- children: /*#__PURE__*/jsx_runtime_.jsx("a", {
- className: "thumb",
- children: /*#__PURE__*/jsx_runtime_.jsx("span", {
- className: "fullimage cover bg1",
- role: "img"
- })
- })
- }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
- className: "info",
- children: [/*#__PURE__*/jsx_runtime_.jsx("img", {
- src: `${backend}${data.img[0]["url"]}`,
- style: {
- width: "100px"
- }
- }), /*#__PURE__*/jsx_runtime_.jsx("time", {
- children: data.published_at
- }), /*#__PURE__*/jsx_runtime_.jsx("h4", {
- className: "title usmall",
- children: /*#__PURE__*/jsx_runtime_.jsx(next_link.default, {
- href: "/blog-details",
- children: /*#__PURE__*/jsx_runtime_.jsx("a", {
- style: {
- fontSize: "15px"
- },
- children: data.title
- })
- })
- })]
- }), /*#__PURE__*/jsx_runtime_.jsx("div", {
- className: "clear"
- })]
- });
- });
- return /*#__PURE__*/jsx_runtime_.jsx("div", {
- children: /*#__PURE__*/jsx_runtime_.jsx("div", {
- className: "blog-area ptb-80",
- children: /*#__PURE__*/jsx_runtime_.jsx("div", {
- className: "container",
- children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
- className: "row",
- children: [/*#__PURE__*/jsx_runtime_.jsx("div", {
- className: "col-lg-8 col-md-12",
- children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
- className: "row justify-content-center",
- children: [NewsList, /*#__PURE__*/jsx_runtime_.jsx("div", {
- className: "col-lg-12 col-md-12",
- children: /*#__PURE__*/jsx_runtime_.jsx("div", {
- className: "pagination-area",
- children: /*#__PURE__*/jsx_runtime_.jsx("nav", {
- "aria-label": "Page navigation",
- children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("ul", {
- className: "pagination justify-content-center",
- children: [/*#__PURE__*/jsx_runtime_.jsx("li", {
- className: "page-item",
- children: /*#__PURE__*/jsx_runtime_.jsx("a", {
- className: "page-link",
- href: "#",
- children: "Prev"
- })
- }), /*#__PURE__*/jsx_runtime_.jsx("li", {
- className: "page-item active",
- children: /*#__PURE__*/jsx_runtime_.jsx("a", {
- className: "page-link",
- href: "#",
- children: "1"
- })
- }), /*#__PURE__*/jsx_runtime_.jsx("li", {
- className: "page-item",
- children: /*#__PURE__*/jsx_runtime_.jsx("a", {
- className: "page-link",
- href: "#",
- children: "2"
- })
- }), /*#__PURE__*/jsx_runtime_.jsx("li", {
- className: "page-item",
- children: /*#__PURE__*/jsx_runtime_.jsx("a", {
- className: "page-link",
- href: "#",
- children: "3"
- })
- }), /*#__PURE__*/jsx_runtime_.jsx("li", {
- className: "page-item",
- children: /*#__PURE__*/jsx_runtime_.jsx("a", {
- className: "page-link",
- href: "#",
- children: "Next"
- })
- })]
- })
- })
- })
- })]
- })
- }), /*#__PURE__*/jsx_runtime_.jsx("div", {
- className: "col-lg-4 col-md-12",
- children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
- className: "widget-area",
- id: "secondary",
- children: [/*#__PURE__*/jsx_runtime_.jsx("div", {
- className: "widget widget_search",
- children: /*#__PURE__*/(0,jsx_runtime_.jsxs)("form", {
- className: "search-form",
- children: [/*#__PURE__*/jsx_runtime_.jsx("label", {
- children: /*#__PURE__*/jsx_runtime_.jsx("input", {
- type: "search",
- className: "search-field",
- placeholder: "Search..."
- })
- }), /*#__PURE__*/jsx_runtime_.jsx("button", {
- type: "submit",
- children: /*#__PURE__*/jsx_runtime_.jsx(external_react_feather_.Search, {})
- })]
- })
- }), PopularNews, /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
- className: "widget widget_categories",
- children: [/*#__PURE__*/jsx_runtime_.jsx("h3", {
- className: "widget-title",
- children: "Categories"
- }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("ul", {
- children: [/*#__PURE__*/jsx_runtime_.jsx("li", {
- children: /*#__PURE__*/jsx_runtime_.jsx("a", {
- href: "#",
- children: "Business"
- })
- }), /*#__PURE__*/jsx_runtime_.jsx("li", {
- children: /*#__PURE__*/jsx_runtime_.jsx("a", {
- href: "#",
- children: "Privacy"
- })
- }), /*#__PURE__*/jsx_runtime_.jsx("li", {
- children: /*#__PURE__*/jsx_runtime_.jsx("a", {
- href: "#",
- children: "Technology"
- })
- }), /*#__PURE__*/jsx_runtime_.jsx("li", {
- children: /*#__PURE__*/jsx_runtime_.jsx("a", {
- href: "#",
- children: "Tips"
- })
- }), /*#__PURE__*/jsx_runtime_.jsx("li", {
- children: /*#__PURE__*/jsx_runtime_.jsx("a", {
- href: "#",
- children: "Uncategorized"
- })
- })]
- })]
- }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
- className: "widget widget_tag_cloud",
- children: [/*#__PURE__*/jsx_runtime_.jsx("h3", {
- className: "widget-title",
- children: "Tags"
- }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("div", {
- className: "tagcloud",
- children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)("a", {
- href: "#",
- children: ["Motor ", /*#__PURE__*/jsx_runtime_.jsx("span", {
- className: "tag-link-count",
- children: "(3)"
- })]
- }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("a", {
- href: "#",
- children: ["Services ", /*#__PURE__*/jsx_runtime_.jsx("span", {
- className: "tag-link-count",
- children: "(3)"
- })]
- }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("a", {
- href: "#",
- children: ["Sparepart ", /*#__PURE__*/jsx_runtime_.jsx("span", {
- className: "tag-link-count",
- children: "(2)"
- })]
- }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("a", {
- href: "#",
- children: ["Promo ", /*#__PURE__*/jsx_runtime_.jsx("span", {
- className: "tag-link-count",
- children: "(2)"
- })]
- }), /*#__PURE__*/(0,jsx_runtime_.jsxs)("a", {
- href: "#",
- children: ["Event ", /*#__PURE__*/jsx_runtime_.jsx("span", {
- className: "tag-link-count",
- children: "(1)"
- })]
- })]
- })]
- })]
- })
- })]
- })
- })
- })
- });
- };
-
- /* harmony default export */ var LatestNews = (News);
- // EXTERNAL MODULE: ./api/latest_news/news.js
- var latest_news_news = __webpack_require__(8888);
- var news_default = /*#__PURE__*/__webpack_require__.n(latest_news_news);
- ;// CONCATENATED MODULE: ./pages/yamaha/LatestNews/index.js
-
-
-
-
- function LatestNews_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = LatestNews_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; }
-
- function LatestNews_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; }
-
-
-
-
-
-
-
-
- const LatestNews_News = function (_ref) {
- let {
- backend,
- news,
- othernews
- } = _ref,
- props = LatestNews_objectWithoutProperties(_ref, ["backend", "news", "othernews"]);
-
- return /*#__PURE__*/(0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
- children: [/*#__PURE__*/jsx_runtime_.jsx(NavbarYamaha/* default */.Z, {}), /*#__PURE__*/jsx_runtime_.jsx(PageBanner/* default */.Z, {
- pageTitle: "Latest News"
- }), /*#__PURE__*/jsx_runtime_.jsx(LatestNews, {
- news: news,
- othernews: othernews,
- backend: backend
- }), /*#__PURE__*/jsx_runtime_.jsx(FooterYamaha/* default */.Z, {})]
- });
- };
-
- /* harmony default export */ var yamaha_LatestNews = (LatestNews_News);
- async function getServerSideProps(context) {
- var news = [];
- var othernews = [];
- const backend = process.env.BACKEND_SERVER_URI;
- var res = await news_default().GetNewsYamaha();
-
- if (res["STATUS"] === 1) {
- news = res["DATA"]["latestNews"];
- }
-
- var res = await news_default().GetOtherNewsYamaha();
-
- if (res["STATUS"] === 1) {
- othernews = res["DATA"]["latestNews"];
- }
-
- console.log(othernews);
- return {
- props: {
- news,
- othernews,
- backend
- } // will be passed to the page component as props
-
- };
- }
-
- /***/ }),
-
- /***/ 8074:
- /***/ (function(module) {
-
- "use strict";
- module.exports = require("@apollo/client");;
-
- /***/ }),
-
- /***/ 1683:
- /***/ (function(module) {
-
- "use strict";
- module.exports = require("cross-fetch");;
-
- /***/ }),
-
- /***/ 8417:
- /***/ (function(module) {
-
- "use strict";
- module.exports = require("next/dist/next-server/lib/router-context.js");;
-
- /***/ }),
-
- /***/ 2238:
- /***/ (function(module) {
-
- "use strict";
- module.exports = require("next/dist/next-server/lib/router/utils/get-asset-path-from-route.js");;
-
- /***/ }),
-
- /***/ 6731:
- /***/ (function(module) {
-
- "use strict";
- module.exports = require("next/router");;
-
- /***/ }),
-
- /***/ 9297:
- /***/ (function(module) {
-
- "use strict";
- module.exports = require("react");;
-
- /***/ }),
-
- /***/ 9337:
- /***/ (function(module) {
-
- "use strict";
- module.exports = require("react-feather");;
-
- /***/ }),
-
- /***/ 5282:
- /***/ (function(module) {
-
- "use strict";
- module.exports = require("react/jsx-runtime");;
-
- /***/ })
-
- };
- ;
-
- // load runtime
- var __webpack_require__ = require("../../webpack-runtime.js");
- __webpack_require__.C(exports);
- var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
- var __webpack_exports__ = __webpack_require__.X(0, [1664,4755,6371,7798,8888], function() { return __webpack_exec__(9838); });
- module.exports = __webpack_exports__;
-
- })();
|