PageSourceSearch

https://hotelzify.com/static/js/3421.cd38f836.chunk.js

js hotelzify.com collected 2026-10-01 15:35:28 UTC 12,473 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunklanding_page=self.webpackChunklanding_page||[]).push([[3421],{3421:(e,t,s)=>{s.r(t),s.d(t,{default:()=>oe});var o=s(9379),i=s(5043),a=s(1591),l=s(4180);const n="BlogPage_blog_header__7EXWu",r="BlogPage_blog_container__sqOcv",d="BlogPage_blog_heading_box__p5OHa",c="BlogPage_sub_heading__jZOZY",g="BlogPage_blog_heading__QSF0h",_="BlogPage_blog_tag__zJnDM",h="BlogPage_blog_cards__mo14o",u="LatestBlogCard_card_container__Jf-zi",v="LatestBlogCard_cntnt_box__pUNtb",m="LatestBlogCard_blog_heading__-1GQ3",p="LatestBlogCard_blog_excerpt__57ApA",x="LatestBlogCard_blog_details__sTuLs",j="LatestBlogCard_blog_author_box__sKoYW",b="LatestBlogCard_blog_dt_card__zDKqz",y="LatestBlogCard_blog_category__4CE8r";var C=s(4794),w=s(2448),N=s(3751),f=s(5346),B=s(579);const k=()=>{var e;const t=(0,N.useHistory)(),[s,o]=(0,i.useState)({});(0,i.useEffect)(()=>{(async()=>{var e,t;const s=await(0,C.f_)({});o(null===s||void 0===s||null===(e=s.data)||void 0===e||null===(t=e.blogs)||void 0===t?void 0:t[0])})()},[]);return(0,B.jsx)("div",{className:u,style:{backgroundImage:"url('".concat(null===s||void 0===s?void 0:s.thumbnail,"')")},children:(0,B.jsxs)("div",{className:v,children:[(0,B.jsxs)("div",{children:[(0,B.jsxs)("div",{className:m,onClick:()=>{var e;(0,f.fireGtmEvent)("latest_blog_card_clicked",{blog_id:null===s||void 0===s?void 0:s.id,blog_title:null===s||void 0===s?void 0:s.title,blog_slug:null===s||void 0===s?void 0:s.slug,blog_category:null===s||void 0===s||null===(e=s.category)||void 0===e?void 0:e.title,component:"LatestBlogCard"}),t.push("/blogs/".concat(null===s||void 0===s?void 0:s.slug))},children:[(0,B.jsx)("h2",{children:null===s||void 0===s?void 0:s.title}),(0,B.jsx)("img",{src:"https://ik.imagekit.io/hotelzifyprod/assets/svg/blog_open.svg",alt:"open"})]}),(0,B.jsx)("p",{className:p,children:null===s||void 0===s?void 0:s.excerpt})]}),(0,B.jsxs)("div",{className:x,children:[(0,B.jsxs)("div",{className:j,children:[(0,B.jsxs)("div",{className:b,children:[(0,B.jsx)("h5",{children:"Written by"}),(0,B.jsxs)("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[(0,B.jsx)("img",{src:"https://ik.imagekit.io/hotelzifyprod/assets/images/Hotelzify.jpg",alt:"author"}),(0,B.jsx)("p",{children:"Hotelzify"})]})]}),(0,B.jsxs)("div",{className:b,children:[(0,B.jsx)("h5",{children:"Published on"}),(0,B.jsx)("p",{children:(null===s||void 0===s?void 0:s.createdAt)&&(0,w.GP)(new Date(null===s||void 0===s?void 0:s.createdAt),"dd MMM yyyy")})]})]}),(0,B.jsxs)("div",{className:b,children:[(0,B.jsx)("h5",{children:"File Under"}),(0,B.jsx)("p",{className:y,children:null===s||void 0===s||null===(e=s.category)||void 0===e?void 0:e.title})]})]})]})})},A="CategoriesAndFilters_container__pRBlC",P="CategoriesAndFilters_categoriesWrapper__cZzwx",L="CategoriesAndFilters_categories__SWWoM",F="CategoriesAndFilters_categoryItem__33+Lk",M="CategoriesAndFilters_categoryLink__rqE+F",I="CategoriesAndFilters_active__sDxoq",E="CategoriesAndFilters_sortContainer__DP8BE",z="CategoriesAndFilters_sortDropdown__1irCj",S="CategoriesAndFilters_chevronIcon__ahIe9",G="CategoriesAndFilters_mobileCategories__in92Z",H="CategoriesAndFilters_mobileCategorySelector__z4GvA",W="CategoriesAndFilters_dropdownArrow__wlBdB",D="CategoriesAndFilters_open__Jjz4z",O="CategoriesAndFilters_mobileCategoriesList__XFLby",T="CategoriesAndFilters_mobileCategoryItem__gpE4Y",Y="CategoriesAndFilters_mobileCategoryLink__ana5F",q="CategoriesAndFilters_activeItem__SkNz+",Z=e=>{var t;let{onChange:s}=e;const[o,a]=(0,i.useState)(null),[l,n]=(0,i.useState)(!1),[r,d]=(0,i.useState)(!1),[c,g]=(0,i.useState)("recent"),[_,h]=(0,i.useState)([{title:"View All",id:null}]);(0,i.useEffect)(()=>{(async()=>{const e=await(0,C.sI)();200===e.status&&h(t=>[...t,...e.data||[]])})()},[]),(0,i.useEffect)(()=>{const e=()=>{n(window.innerWidth<=768)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]);const u=e=>{var t;const o=null===(t=_.find(t=>t.id===e))||void 0===t?void 0:t.title;(0,f.fireGtmEvent)("blog_category_clicked",{category_id:e,category_name:o,is_mobile:l,component:"C
1ategoriesAndFilters"}),a(e),l&&d(!1),s({categoryId:e,sortBy:c})},v=null===(t=_.find(e=>e.id===o))||void 0===t?void 0:t.title;return(0,B.jsxs)("div",{className:A,children:[l?(0,B.jsxs)("div",{className:G,children:[(0,B.jsxs)("div",{className:H,onClick:()=>{(0,f.fireGtmEvent)("blog_category_dropdown_toggled",{is_opening:!r,component:"CategoriesAndFilters"}),d(!r)},children:[(0,B.jsx)("span",{children:v}),(0,B.jsx)("svg",{className:"".concat(W," ").concat(r?D:""),xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,B.jsx)("path",{d:"M6 9l6 6 6-6"})})]}),r&&(0,B.jsx)("ul",{className:O,children:_.map(e=>(0,B.jsx)("li",{className:T,children:(0,B.jsx)("button",{className:"".concat(Y," ").concat(o===e.id?q:""),onClick:()=>u(e.id),children:null===e||void 0===e?void 0:e.title})},e.id))})]}):(0,B.jsx)("div",{className:P,children:(0,B.jsx)("ul",{className:L,children:_.map(e=>(0,B.jsx)("li",{className:F,children:(0,B.jsx)("button",{className:"".concat(M," ").concat(o===e.id?I:""),onClick:()=>u(e.id),children:e.title})},e.id))})}),(0,B.jsxs)("div",{className:E,children:[(0,B.jsxs)("select",{className:z,value:c,onChange:e=>{(0,f.fireGtmEvent)("blog_sort_changed",{sort_by:e.target.value,category_id:o,component:"CategoriesAndFilters"}),s({categoryId:o,sortBy:e.target.value}),g(e.target.value)},children:[(0,B.jsx)("option",{value:"recent",children:"Most recent"}),(0,B.jsx)("option",{value:"oldest",children:"Oldest"}),(0,B.jsx)("option",{value:"popular",children:"Most popular"})]}),(0,B.jsx)("div",{className:S,children:(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,B.jsx)("path",{d:"M6 9l6 6 6-6"})})})]})]})};var J=s(6946);const K="Pagination_paginationContainer__PjPId",Q="Pagination_paginationArrow__T31VM",V="Pagination_arrowIcon__+pQh4",X="Pagination_pageNumbers__1bY-c",R="Pagination_pageNumber__cesLr",U="Pagination_active__MuxsE",$="Pagination_ellipsis__Qs3Ua",ee=e=>{let{currentPage:t,totalPages:s,onPageChange:o}=e;const a=parseInt(t,10),l=parseInt(s,10),n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"page_number";e>=1&&e<=l&&e!==a&&((0,f.fireGtmEvent)("blog_pagination_page_changed",{from_page:a,to_page:e,total_pages:l,click_type:t,component:"Pagination"}),o({page:e}))};return(0,B.jsxs)("div",{className:K,children:[(0,B.jsxs)("button",{className:Q,onClick:()=>n(a-1,"previous"),disabled:1===a,children:[(0,B.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:V,children:(0,B.jsx)("path",{d:"M19 12H5M5 12L12 19M5 12L12 5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),"Previous"]}),(0,B.jsx)("div",{className:X,children:(()=>{const e=[];e.push(1),a>3&&e.push("...");for(let t=Math.max(2,a-1);t<=Math.min(l-1,a+1);t++)t>1&&t<l&&e.push(t);return a<l-2&&e.push("..."),l>1&&e.push(l),e})().map((e,t)=>(0,B.jsx)(i.Fragment,{children:"..."===e?(0,B.jsx)("span",{className:$,children:"..."}):(0,B.jsx)("button",{className:"".concat(R," ").concat(a===e?U:""),onClick:()=>n(e),children:e})},t))}),(0,B.jsxs)("button",{className:Q,onClick:()=>n(a+1,"next"),disabled:a===l,children:["Next",(0,B.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:V,children:(0,B.jsx)("path",{d:"M5 12H19M19 12L12 5M19 12L12 19",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})};var te=s(6986),se=s(9998);const oe=()=>{const[e,t]=(0,i.useState)([]),[s,u]=(0,i.useState)({}),[v,m]=(0,i.useState)({categoryId:null,sortBy:"recent",page:1,limit:10});(0,i.useEffect)(()=>{(async()=>{var e,s;const o=await(0,C.f_)(v);console.log({response:o}),t((null===o||void 0===o||null===(e=o.data)||void 0===e?void 0:e.blogs)||[]),u((null===o||void 0===o||null===(s=o.data)||void 0===s?void 0:s.pagination)||{})})()},[v]),(0,i.useEffect)(()=>{(0,f.fireGtmEvent)("blog_page_viewed",{page_type:"blog_listing",component:"BlogPage"})},[]);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(a.m,{children:[(0,B.jsx)("title",{children:"Blog | Hotelzify - Resources and Insights"}),(0,B.jsx)("meta",{name:"description",content:"The latest industry news, interviews, technologies, and resources for hoteliers from the Hotelzify team."}),(0,B.jsx)("link",{rel:"canonical",href:"undefined"!==typeof window?"".concat(window.location.origin,"/blogs"):"https://hotelzify.com/blogs"})]}),(0,B.jsx)("div",{className:n,children:(0,B.jsx)(l.A,{})}),(0,B.jsxs)("div",{className:r,children:[(0,B.jsxs)("div",{className:d,children:[(0,B.jsx)("h3",{className:c,children:"Our blog"}),(0,B.jsx)("h1",{className:g,children:"Resources and insights"}),(0,B.jsx)("p",{className:_,children:"The latest industry news, interviews, technologies, and resources."})]}),(0,B.jsx)(k,{}),(0,B.jsx)(Z,{onChange:e=>{let{categoryId:t,sortBy:s}=e;console.log({categoryId:t,sortBy:s}),(0,f.fireGtmEvent)("blog_filter_changed",{category_id:t,sort_by:s,component:"BlogPage"}),m(e=>(0,o.A)((0,o.A)({},e),{},{categoryId:t,sortBy:s}))}}),(0,B.jsx)("div",{className:h,children:null===e||void 0===e?void 0:e.map(e=>{var t;return(0,B.jsx)(J.A,{title:null===e||void 0===e?void 0:e.title,excerpt:null===e||void 0===e?void 0:e.excerpt,thumbnail:null===e||void 0===e?void 0:e.thumbnail,createdAt:null===e||void 0===e?void 0:e.createdAt,category:null===e||void 0===e||null===(t=e.category)||void 0===t?void 0:t.t
1itle,slug:e.slug},null===e||void 0===e?void 0:e.id)})}),(0,B.jsx)(ee,{totalPages:null===s||void 0===s?void 0:s.totalPages,currentPage:null===s||void 0===s?void 0:s.currentPage,onPageChange:e=>{let{page:t}=e;(0,f.fireGtmEvent)("blog_pagination_clicked",{page_number:t,total_pages:null===s||void 0===s?void 0:s.totalPages,component:"BlogPage"}),m(e=>(0,o.A)((0,o.A)({},e),{},{page:t}))}})]}),(0,B.jsx)(se.A,{}),(0,B.jsx)(te.A,{})]})}},4794:(e,t,s)=>{s.d(t,{f_:()=>i,lo:()=>l,sI:()=>a});var o=s(666);const i=e=>{const{page:t=1,limit:s=10,sortBy:i="recent",categoryId:a=null}=e,l=a?"page=".concat(t,"&limit=").concat(s,"&status=published&sortBy=").concat(i,"&categoryId=").concat(a):"page=".concat(t,"&limit=").concat(s,"&status=published&sortBy=").concat(i);return o.A.get("/hotel/v1/blog?".concat(l))},a=()=>o.A.get("/hotel/v1/blog/categories?activeOnly=true"),l=e=>o.A.get("/hotel/v1/blog/slug?slug=".concat(e))},6946:(e,t,s)=>{s.d(t,{A:()=>b});s(5043);const o="BlogCard_card__qaO8x",i="BlogCard_title__DIWXE",a="BlogCard_imageContainer__YrwT3",l="BlogCard_image__hTnKM",n="BlogCard_content__NrnZt",r="BlogCard_category__PrvvS",d="BlogCard_arrow__mejnh",c="BlogCard_description__0JODT",g="BlogCard_authorSection__DI3Y4",_="BlogCard_authorImage__nG2uK",h="BlogCard_authorInfo__OHFBX",u="BlogCard_authorName__MSfe7",v="BlogCard_date__dVxOy";var m=s(2448),p=s(3751),x=s(5346),j=s(579);const b=e=>{let{thumbnail:t,category:s="category",title:b,excerpt:y,slug:C,authorName:w="Hotelzify",createdAt:N}=e;const f=(0,p.useHistory)(),B=e=>{(0,x.fireGtmEvent)("blog_card_clicked",{blog_title:b,blog_slug:C,blog_category:s,click_source:e,component:"BlogPostCard"}),f.push("/blogs/".concat(C))};return(0,j.jsxs)("div",{className:o,children:[(0,j.jsx)("div",{className:a,onClick:()=>B("image"),children:(0,j.jsx)("img",{src:t,alt:b,className:l})}),(0,j.jsxs)("div",{className:n,children:[(0,j.jsx)("div",{className:r,children:s}),(0,j.jsxs)("h2",{className:i,onClick:()=>B("title"),children:[b,(0,j.jsx)("span",{className:d,children:(0,j.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,j.jsx)("path",{d:"M7 17L17 7M17 7H7M17 7V17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(0,j.jsx)("p",{className:c,children:y})]}),(0,j.jsxs)("div",{className:g,children:[(0,j.jsx)("img",{src:"https://ik.imagekit.io/hotelzifyprod/assets/images/Hotelzify.jpg",alt:w,className:_}),(0,j.jsxs)("div",{className:h,children:[(0,j.jsx)("div",{className:u,children:w}),(0,j.jsx)("div",{className:v,children:(0,m.GP)(new Date(N),"dd MMM yyyy")})]})]})]})}}}]);
2//# sourceMappingURL=3421.cd38f836.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.