PageSourceSearch

https://iet-yp-website.vercel.app/_next/static/chunks/pages/events/[category]-6e85fc6af8fcece8.js

js iet-yp-website.vercel.app collected 2026-10-03 07:06:53 UTC 7,027 bytes, 6 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4153],{58433:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/events/[category]",function(){return n(80755)}])},16771:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var l=n(85893),s=n(25675),i=n.n(s),r=n(41664),a=n.n(r),c=n(72761);let o=["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"];function d(e){let{event:t,url:n,showDate:s}=e,r=new Date(t.date);return void 0===s&&(s=!0),(!t.date||isNaN(r.getTime()))&&(s=!1),(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"flex flex-col flex-wrap w-full bg-slate-200 rounded-2xl max-md:mb-5 overflow-clip",children:[(0,l.jsx)("div",{className:"relative overflow-clip",children:(0,l.jsxs)(a(),{href:n||"/events/event/".concat(t.slug),children:[(0,l.jsx)(i(),{src:(0,c.i)(t.featured_image),width:500,height:100,alt:"slide_iamge",className:"hover:scale-110 transition-all duration-300 object-cover w-full h-56"}),s&&(0,l.jsxs)("div",{className:" bg-iet-blue-400 text-iet-blue-50 px-4 py-2 w-18 absolute top-2 right-2 rounded-tr-xl",children:[(0,l.jsx)("span",{className:" text-3xl",children:r.getDate()}),(0,l.jsx)("span",{className:" align-super",children:function(e){if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}(r.getDate())}),(0,l.jsx)("br",{}),(0,l.jsx)("span",{className:" text-2xl",children:o[r.getMonth()]})]}),t.uni_logo&&(0,l.jsx)("div",{className:"absolute top-[-80px] left-[-80px] bg-gray-100 rotate-45 w-40 h-40 pe-1 flex items-center justify-end opacity-85",children:(0,l.jsx)(i(),{src:(0,c.i)(t.uni_logo),width:50,height:50,alt:"slide_iamge",className:"object-contain w-16 h-12 -rotate-45"})}),(0,l.jsx)("div",{className:" bg-iet-dark-blue-950 text-white text-2xl px-4 py-3 w-full absolute bottom-0 bg-opacity-90 max-[320px]:top-24",children:(0,l.jsx)("h2",{title:t.title,className:"line-clamp-2",children:t.title})})]})}),(0,l.jsx)("p",{className:" text-sm font-light text-justify px-4 py-6 line-clamp-4 text-ellipsis",children:t.short_description}),(0,l.jsx)(a(),{href:n||"/events/event/".concat(t.slug),className:"mt-auto",children:(0,l.jsx)("button",{className:"text-white hover:text-iet-dark py-2 px-4 mx-4 mt-8 mb-4 bg-iet-primary rounded-md transition duration-150",children:"Read More"})})]})})}},97461:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var l=n(85893);function s(e){let{title:t,description:n}=e;return(0,l.jsx)("section",{className:"page-title",children:(0,l.jsxs)("div",{className:"content-width-wrapper flex flex-col gap-8 items-center justify-center min-h-32 py-12",children:[(0,l.jsx)("h1",{className:"text-4xl font-bold text-center",dangerouslySetInnerHTML:{__html:t}}),n&&(0,l.jsx)("p",{className:"text-lg text-center font-light",children:n})]})})}},92492:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var l=n(85893);function s(){return(0,l.jsx)("div",{className:"flex justify-center items-center h-screen",children:(0,l.jsx)("div",{className:"animate-spin rounded-full h-32 w-32 border-b-2 border-gray-900"})})}},80755:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return g},default:function(){return f}});var l=n(85893),s=n(16771),i=n(97461),r=n(92492),a=n(72761);/**
2 * @license lucide-react v0.378.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */let c=(0,n(1462).Z)("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);var o=n(25675),d=n.n(o),u=n(41664),x=n.n(u),h=n(67294);function p(e){let{slug:t,uni_list:n}=e,[s,i]=(0,h.useState)(!1);return(0,l.jsxs)("div",{className:" content-width-wrapper",children:[(0,l.jsx)("div",{className:"w-full flex items-end justify-end mb-3",children:(0,l.jsx)("button",{type:"button",title:"Show filter",className:"hover:text-iet-dark",onClick:()=>{i(!s)},children:(0,l.jsx)(c,{size:"1.5rem"})})}),s&&(0,l.jsxs)("div",{className:"flex flex-wrap justify-center items-center gap-4",children:[(0,l.jsx)(x(),{href:"/events/".concat(t),children:(0,l.jsx)("button",{title:"All universities",type:"button",className:"flex items-center justify-center py-4 px-6 border bg-white rounded-lg shadow-lg max-w-[200px] gap-2 hover:bg-iet-blue-100 transition duration-150 ",children:(0,l.jsx)("div",{className:"text-nowrap text-clip w-full overflow-clip",children:"All Universities"})})}),n.map(e=>(0,l.jsx)(x(),{href:"/events/".concat(t,"?university=").concat(e.slug),children:(0,l.jsxs)("button",{title:"Filter by ".concat(e.name),type:"button",className:"flex items-center justify-center py-4 px-6 border bg-white rounded-lg shadow-lg max-w-[200px] gap-2 hover:bg-iet-blue-100 transition duration-150 "+(e.selected?"border-gray-600 shadow-gray-300":""),children:[e.logo&&(0,l.jsx)(d(),{src:(0,a.i)(e.logo),width:50,height:50,alt:e.name,className:"w-6 h-6 object-contain"}),(0,l.jsx)("div",{className:"text-nowrap text-clip w-full overflow-clip",children:e.name})]})},e.slug))]})]})}var m=n(11163),g=!0;function f(e){let{name:t,description:n,slug:a,events:c,uni_list:o}=e,[d,u]=(0,h.useState)(null),[x,g]=(0,h.useState)(!!c&&c.length>=12),[f,j]=(0,h.useState)(!1),b=(0,m.useRouter)();(0,h.useEffect)(()=>{g(!!c&&c.length>=12),j(!1)},[]),(0,h.useEffect)(()=>{u(c||null)},[c]);let w=(0,h.useCallback)(()=>
6{if(f)return;j(!0);let e=(null==d?void 0:d.length)||0,t=new URLSearchParams;if(t.append("category",a),t.append("start",e.toString()),t.append("end",(e+12-1).toString()),o){let e=o.find(e=>e.selected);e&&t.append("university",e.slug)}fetch("/api/events?".concat(t.toString())).then(e=>e.json()).then(e=>{e.length<12&&g(!1),e.length>0&&(null!==d&&d.length>0?u([...d,...e]):u(e))}).catch(e=>{console.error(e),g(!1)}).finally(()=>{j(!1)})},[f,d,a]);return b.isFallback||!d?(0,l.jsx)(r.Z,{}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.Z,{title:t,description:n}),o&&o.length>0&&(0,l.jsx)(p,{slug:a,uni_list:o}),d&&d.length>0&&(0,l.jsxs)("section",{className:" content-width-wrapper py-12 pb-24",children:[(0,l.jsxs)("div",{className:"grid gap-6 grid-cols-1 md:grid-cols-2 lg:grid-cols-3",children:[(0,l.jsx)("div",{className:"mb-8 text-3xl font-bold w-full md:bg-iet-dark-blue-950 lg:p-5 lg:h-56 p-3 rounded-xl md:mb-5 hidden",children:(0,l.jsx)("h2",{className:"md:text-iet-blue-400 max-lg:text-center",children:"All Events"})}),null==d?void 0:d.map(e=>(0,l.jsx)(s.Z,{event:e},e.slug))]}),(0,l.jsx)("div",{className:"flex justify-center mt-8",children:x&&(f?(0,l.jsx)("button",{className:"bg-iet-blue-400 text-white px-8 py-2 rounded-lg",disabled:!0,children:"Loading..."}):(0,l.jsx)("button",{className:"bg-iet-blue-400 text-white px-8 py-2 rounded-lg",onClick:w,children:"Load More"}))})]}),c&&0===c.length&&(0,l.jsx)("section",{className:"content-width-wrapper pt-12 pb-24",children:(0,l.jsx)("h2",{className:"text-3xl font-bold text-gray-300",children:"No Events Found"})})]})}}},function(e){e.O(0,[2888,9774,179],function(){return e(e.s=58433)}),_N_E=e.O()}]);

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.