%PDF- %PDF-
Direktori : /var/www/html/.next/server/pages/news/ |
Current File : /var/www/html/.next/server/pages/news/[slug].js |
"use strict"; (() => { var exports = {}; exports.id = 376; exports.ids = [376]; exports.modules = { /***/ 3540: /***/ ((module, __webpack_exports__, __webpack_require__) => { __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try { __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), /* harmony export */ "getServerSideProps": () => (/* binding */ getServerSideProps) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(997); /* 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__(6689); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _src_Components_News__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6856); /* harmony import */ var _src_Components_Contact__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2300); /* harmony import */ var next_image__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5675); /* harmony import */ var next_image__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_image__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var html_react_parser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2905); /* harmony import */ var _src_Components_Global_CustomHead__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(787); /* harmony import */ var gsap__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(4287); /* harmony import */ var gsap__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(gsap__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var gsap_dist_ScrollTrigger__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(4965); /* harmony import */ var gsap_dist_ScrollTrigger__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(gsap_dist_ScrollTrigger__WEBPACK_IMPORTED_MODULE_8__); var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_src_Components_News__WEBPACK_IMPORTED_MODULE_2__, _src_Components_Contact__WEBPACK_IMPORTED_MODULE_3__, html_react_parser__WEBPACK_IMPORTED_MODULE_5__]); ([_src_Components_News__WEBPACK_IMPORTED_MODULE_2__, _src_Components_Contact__WEBPACK_IMPORTED_MODULE_3__, html_react_parser__WEBPACK_IMPORTED_MODULE_5__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__); gsap__WEBPACK_IMPORTED_MODULE_7___default().registerPlugin((gsap_dist_ScrollTrigger__WEBPACK_IMPORTED_MODULE_8___default())); function NewsDetails({ data , seo }) { const date = new Date(data?.date); const options = { month: "long" }; const longMonth = new Intl.DateTimeFormat("en-US", options).format(date); const dateDay = date.getDate() < 10 ? `0${date.getDate()}` : date.getDate(); const dateYear = date.getFullYear(); (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ window.scrollTo({ top: 0, left: 0, behavior: "smooth" }); }, []); return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [ /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_src_Components_Global_CustomHead__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, { data: seo }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "mainNewsDetails", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "detailsContent", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "info", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", { children: [ longMonth, " ", dateDay, ", ", dateYear ] }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("h1", { children: (0,html_react_parser__WEBPACK_IMPORTED_MODULE_5__["default"])(data?.title?.rendered) }) ] }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", { className: "dummyText", children: (0,html_react_parser__WEBPACK_IMPORTED_MODULE_5__["default"])(data?.content?.rendered) }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", { className: "image" }) ] }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("div", { className: "news", children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_src_Components_News__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, { data: data?.related, related: true, titleNews: data?.related?.title }) }), /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_src_Components_Contact__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, {}) ] }) ] }); } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (NewsDetails); async function getServerSideProps(ctx) { const slug = ctx.query.slug; const res = await fetch(`https://api.atvbuggy-dubrovnik.com/wp-json/wp/v2/posts?slug=${slug}`).then((response)=>response.json()).then((data)=>data); if (!res) { return { notFound: true }; } return { props: { data: res[0], seo: res[0].yoast_head_json } }; } __webpack_async_result__(); } catch(e) { __webpack_async_result__(e); } }); /***/ }), /***/ 2296: /***/ ((module) => { module.exports = require("formik"); /***/ }), /***/ 4287: /***/ ((module) => { module.exports = require("gsap"); /***/ }), /***/ 4965: /***/ ((module) => { module.exports = require("gsap/dist/ScrollTrigger"); /***/ }), /***/ 3280: /***/ ((module) => { module.exports = require("next/dist/shared/lib/app-router-context.js"); /***/ }), /***/ 2796: /***/ ((module) => { module.exports = require("next/dist/shared/lib/head-manager-context.js"); /***/ }), /***/ 4957: /***/ ((module) => { module.exports = require("next/dist/shared/lib/head.js"); /***/ }), /***/ 4014: /***/ ((module) => { module.exports = require("next/dist/shared/lib/i18n/normalize-locale-path.js"); /***/ }), /***/ 744: /***/ ((module) => { module.exports = require("next/dist/shared/lib/image-config-context.js"); /***/ }), /***/ 5843: /***/ ((module) => { module.exports = require("next/dist/shared/lib/image-config.js"); /***/ }), /***/ 8524: /***/ ((module) => { module.exports = require("next/dist/shared/lib/is-plain-object.js"); /***/ }), /***/ 8020: /***/ ((module) => { module.exports = require("next/dist/shared/lib/mitt.js"); /***/ }), /***/ 4406: /***/ ((module) => { module.exports = require("next/dist/shared/lib/page-path/denormalize-page-path.js"); /***/ }), /***/ 4964: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router-context.js"); /***/ }), /***/ 1751: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/add-path-prefix.js"); /***/ }), /***/ 6220: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/compare-states.js"); /***/ }), /***/ 299: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/format-next-pathname-info.js"); /***/ }), /***/ 3938: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/format-url.js"); /***/ }), /***/ 9565: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/get-asset-path-from-route.js"); /***/ }), /***/ 5789: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/get-next-pathname-info.js"); /***/ }), /***/ 1897: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/is-bot.js"); /***/ }), /***/ 1428: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/is-dynamic.js"); /***/ }), /***/ 8854: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/parse-path.js"); /***/ }), /***/ 1292: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/parse-relative-url.js"); /***/ }), /***/ 4567: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/path-has-prefix.js"); /***/ }), /***/ 979: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/querystring.js"); /***/ }), /***/ 3297: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/remove-trailing-slash.js"); /***/ }), /***/ 6052: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/resolve-rewrites.js"); /***/ }), /***/ 4226: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/route-matcher.js"); /***/ }), /***/ 5052: /***/ ((module) => { module.exports = require("next/dist/shared/lib/router/utils/route-regex.js"); /***/ }), /***/ 9232: /***/ ((module) => { module.exports = require("next/dist/shared/lib/utils.js"); /***/ }), /***/ 968: /***/ ((module) => { module.exports = require("next/head"); /***/ }), /***/ 6689: /***/ ((module) => { module.exports = require("react"); /***/ }), /***/ 997: /***/ ((module) => { module.exports = require("react/jsx-runtime"); /***/ }), /***/ 5609: /***/ ((module) => { module.exports = require("yup"); /***/ }), /***/ 2905: /***/ ((module) => { module.exports = import("html-react-parser");; /***/ }), /***/ 3877: /***/ ((module) => { module.exports = import("swiper");; /***/ }), /***/ 3015: /***/ ((module) => { module.exports = import("swiper/react");; /***/ }), /***/ 5941: /***/ ((module) => { module.exports = import("swr");; /***/ }) }; ; // load runtime var __webpack_require__ = require("../../webpack-runtime.js"); __webpack_require__.C(exports); var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId)) var __webpack_exports__ = __webpack_require__.X(0, [676,61,783,787,300,78,856], () => (__webpack_exec__(3540))); module.exports = __webpack_exports__; })();