File manager - Edit - /home/webapp69.cm.in.th/u69319090023/Shop23/_next/static/chunks/101sod_9oq_lq.js
Back
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67927,e=>{"use strict";let t=(0,e.i(56420).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,t],67927)},28623,e=>{"use strict";let t=(0,e.i(56420).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);e.s(["Sparkles",0,t],28623)},31310,e=>{"use strict";let t=(0,e.i(56420).default)("shirt",[["path",{d:"M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z",key:"1wgbhj"}]]);e.s(["Shirt",0,t],31310)},29926,e=>{"use strict";var t=e.i(21993);class a{static getDynamicCategories(){try{let e=localStorage.getItem("ctc_categories");if(e){let t=JSON.parse(e);if(Array.isArray(t)&&t.length>0)return t.filter(e=>!1!==e.active).map(e=>({id:e.id,name:e.name,slug:e.slug||e.id.replace("cat_",""),iconName:e.icon||"Tag",image:e.image||"/u69319090023/Shop23/images/categories/accessories.svg"}))}}catch(e){console.error(e)}return t.mockCategories}static async getCategories(){return new Promise(e=>{e(a.getDynamicCategories())})}static async getCategoryById(e){return a.getDynamicCategories().find(t=>t.id===e)}static async getCategoryBySlug(e){return a.getDynamicCategories().find(t=>t.slug===e)}}e.s(["CategoryService",0,a,"default",0,a])},13285,e=>{"use strict";let t=(0,e.i(56420).default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);e.s(["Layers",0,t],13285)},25953,e=>{"use strict";var t=e.i(43476),a=e.i(71645),r=e.i(22016),s=e.i(67927),i=e.i(31310),l=e.i(56420);let o=(0,l.default)("square-check-big",[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);var c=e.i(13285);let n=(0,l.default)("wind",[["path",{d:"M12.8 19.6A2 2 0 1 0 14 16H2",key:"148xed"}],["path",{d:"M17.5 8a2.5 2.5 0 1 1 2 4H2",key:"1u4tom"}],["path",{d:"M9.8 4.4A2 2 0 1 1 11 8H2",key:"75valh"}]]);var d=e.i(80799),g=e.i(28623),h=e.i(21993),m=e.i(29926);let u=()=>{let[e,l]=(0,a.useState)(h.mockCategories);return(0,a.useEffect)(()=>{let e=()=>{m.CategoryService.getCategories().then(e=>{e&&e.length>0&&l(e)})};return e(),window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[]),(0,t.jsxs)("section",{className:"bg-gradient-to-b from-[#1E0306] via-[#160204] to-[#120103] pt-2 pb-8 sm:pb-10 px-4 sm:px-6 lg:px-8 border-b border-white/5 relative z-10 font-prompt",children:[(0,t.jsx)("style",{children:` .scrollbar-none::-webkit-scrollbar { display: none; } .scrollbar-none { -ms-overflow-style: none; scrollbar-width: none; } `}),(0,t.jsxs)("div",{className:"mx-auto max-w-7xl",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-5 border-b border-white/5 pb-3",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 rounded-full bg-[#E5C158]"}),(0,t.jsx)("h2",{className:"text-lg sm:text-xl font-bold text-white tracking-wide",children:"หมวดหมู่สินค้า"})]}),(0,t.jsxs)(r.default,{href:"/categories",className:"group flex items-center text-xs sm:text-sm font-semibold text-[#E5C158] hover:text-[#FFF2D6] transition-colors",children:[(0,t.jsx)("span",{children:"ดูทั้งหมด"}),(0,t.jsx)(s.ChevronRight,{className:"w-4 h-4 ml-0.5 transition-transform duration-200 group-hover:translate-x-0.5"})]})]}),(0,t.jsx)("div",{className:"scrollbar-none overflow-x-auto flex flex-nowrap lg:grid lg:grid-cols-6 justify-start lg:justify-between items-center gap-4 sm:gap-6 pb-2 lg:pb-0 px-1",children:e.map(e=>(0,t.jsxs)(r.default,{href:`/products?category=${e.slug}`,passHref:!0,className:"group flex flex-col items-center justify-center text-center cursor-pointer flex-shrink-0 w-20 sm:w-auto",children:[(0,t.jsx)("div",{className:"w-14 h-14 sm:w-16 sm:h-16 rounded-2xl flex items-center justify-center bg-[#250509] border border-[#D4AF37]/20 shadow-md transition-all duration-300 group-hover:scale-105 group-hover:bg-[#800A0A] group-hover:border-[#D4AF37]/60 group-hover:shadow-[0_4px_16px_rgba(128,10,10,0.5)]",children:((e,a="w-6 h-6 sm:w-7 sm:h-7 text-[#E5C158] transition-colors duration-300 group-hover:text-white")=>{switch(e){case"Shirt":return(0,t.jsx)(i.Shirt,{className:a});case"CheckSquare":return(0,t.jsx)(o,{className:a});case"Layers":return(0,t.jsx)(c.Layers,{className:a});case"Wind":return(0,t.jsx)(n,{className:a});case"Tag":return(0,t.jsx)(d.Tag,{className:a});default:return(0,t.jsx)(g.Sparkles,{className:a})}})(e.iconName)}),(0,t.jsx)("span",{className:"mt-2.5 text-xs sm:text-sm font-semibold text-gray-200 group-hover:text-[#E5C158] transition-colors duration-200 tracking-wide text-center truncate max-w-[80px] sm:max-w-full",children:e.name})]},e.id))})]})]})};e.s(["CategoriesGrid",0,u,"default",0,u],25953)}]);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.45 |
proxy
|
phpinfo
|
Settings