PageSourceSearch

https://www.earlyjobs.ai/_next/static/chunks/app/blogs/page-5ff8bd831d9f5504.js

js earlyjobs.ai collected 2026-10-05 14:49:43 UTC 13,084 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8156],{3245:(e,t,a)=>{"use strict";a.d(t,{w:()=>l});var r=a(18720);let s="https://portal-bd-prod.earlyjobs.ai/api",l={getBlogs:async e=>{try{let t=new URLSearchParams;e&&Object.entries(e).forEach(e=>{let[a,r]=e;null!=r&&""!==r&&t.append(a,String(r))});let a="".concat(s,"/blogs").concat(t.toString()?"?".concat(t.toString()):""),r=await fetch(a,{method:"GET"}),l=await r.json();if(!r.ok)throw Error(l.message||"Failed to fetch blogs");return l}catch(a){var t;let e=(null==a?void 0:a.message)||"Failed to fetch blogs";throw(null==a||null==(t=a.response)?void 0:t.status)!==401&&r.toast.error(e),a}},getBlogById:async e=>{try{let t=await fetch("".concat(s,"/blogs/").concat(e),{method:"GET"}),a=await t.json();if(!t.ok)throw Error(a.message||"Failed to fetch blog");return a}catch(t){let e=(null==t?void 0:t.message)||"Failed to fetch blog";throw r.toast.error(e),t}},getBlogBySlug:async e=>{try{let t=await fetch("".concat(s,"/blogs/slug/").concat(e),{method:"GET"}),a=await t.json();if(!t.ok)throw Error(a.message||"Failed to fetch blog");return a}catch(t){let e=(null==t?void 0:t.message)||"Failed to fetch blog";throw r.toast.error(e),t}},likeBlog:async e=>{try{let t=await fetch("".concat(s,"/blogs/").concat(e,"/like"),{method:"POST",headers:{"Content-Type":"application/json"}}),a=await t.json();if(!t.ok)throw Error(a.message||"Failed to like blog");return a}catch(t){let e=(null==t?void 0:t.message)||"Failed to like blog";throw r.toast.error(e),t}}}},42268:(e,t,a)=>{Promise.resolve().then(a.bind(a,49793))},47234:(e,t,a)=>{"use strict";a.d(t,{p:()=>o});var r=a(95155),s=a(12115),l=a(31185);let o=s.forwardRef((e,t)=>{let{className:a,type:s,...o}=e;return(0,r.jsx)("input",{type:s,className:(0,l.cn)("flex h-10 w-full rounded-md border border-gray-300 bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0  disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",a),ref:t,...o})});o.displayName="Input"},49793:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>N});var r=a(95155),s=a(12115),l=a(20063),o=a(3245),n=a(21570),i=a(47234),c=a(56952),d=a(84555),g=a(86651),h=a(35299),x=a(16485),u=a(57828),m=a(83457),f=a(90368),p=a(27937),b=a(51608),v=a(67197),w=a(8515),j=a(15239);function y(){let e=(0,l.useRouter)(),t=(0,l.useSearchParams)(),[a,y]=(0,s.useState)([]),[N,k]=(0,s.useState)(!0),[S,C]=(0,s.useState)(null),[E,A]=(0,s.useState)(1),[R,F]=(0,s.use
1State)(1),[B,P]=(0,s.useState)(0),[T,$]=(0,s.useState)(""),[U,_]=(0,s.useState)(""),[z,I]=(0,s.useState)([]);(0,s.useEffect)(()=>{let e=parseInt(t.get("page")||"1",10),a=t.get("tag")||"",r=t.get("search")||"";A(e),_(a),$(r)},[t]),(0,s.useEffect)(()=>{L()},[E,U,T]);let L=async()=>{try{k(!0),C(null);let e={page:E,limit:12,status:"published"};U&&(e.tag=U),T&&(e.search=T);let t=await o.w.getBlogs(e);if(t.success&&t.data){y(t.data.blogs),F(t.data.pagination.totalPages),P(t.data.pagination.totalResults);let e=new Set;t.data.blogs.forEach(t=>{var a;null==(a=t.tags)||a.forEach(t=>e.add(t))}),I(Array.from(e))}}catch(e){C((null==e?void 0:e.message)||"Failed to load blogs"),console.error("Error fetching blogs:",e)}finally{k(!1)}},O=()=>{let t=new URLSearchParams;T&&t.set("search",T),U&&t.set("tag",U),t.set("page","1"),e.push("/blogs?".concat(t.toString()))},D=t=>{let a=new URLSearchParams;T&&a.set("search",T),a.set("tag",t),a.set("page","1"),e.push("/blogs?".concat(a.toString()))},G=t=>{let a=new URLSearchParams;T&&a.set("search",T),U&&a.set("tag",U),a.set("page",t.toString()),e.push("/blogs?".concat(a.toString())),window.scrollTo({top:0,behavior:"smooth"})};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(b.default,{}),(0,r.jsx)(v.default,{}),(0,r.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-white to-orange-50/30",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 lg:py-12",children:[(0,r.jsxs)("div",{className:"text-center mb-12",children:[(0,r.jsxs)("h1",{className:"text-4xl sm:text-5xl font-bold text-gray-900 mb-4",children:["Our ",(0,r.jsx)("span",{className:"text-orange-500",children:"Blog"})]}),(0,r.jsx)("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto",children:"Expert tips, insights, and success stories to help you navigate your career journey"})]}),(0,r.jsxs)("div",{className:"mb-8 space-y-4",children:[(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row gap-4",children:[(0,r.jsxs)("div",{className:"flex-1 relative",children:[(0,r.jsx)(g.A,{className:"absolute left-4 top-1/2 -translate-y-1/2 h-5 w-5 text-gray-400"}),(0,r.jsx)(i.p,{type:"text",placeholder:"Search blogs...",value:T,onChange:e=>$(e.target.value),onKeyDown:e=>"Enter"===e.key&&O(),className:"pl-12 h-12 rounded-xl border-2 border-gray-200 focus:border-orange-500"})]}),(0,r.jsx)(n.$,{onClick:O,className:"h-12 px-8 bg-orange-500 hover:bg-orange-600 text-white rounded-xl font-semibold",children:"Search"})]}),z.length>0&&(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,r.jsx)(n.$,{variant:""===U?"default":"outline",size:"sm",onClick:()=>D(""),className:""===U?"bg-orange-500 text-white":"",children:"All"}),z.map(e=>(0,r.jsx)(n.$,{variant:U===e?"default":"outline",size:"sm",onClick:()=>D(e),className:U===e?"bg-orange-500 text-white":"",children:e},e))]})]}),!N&&(0,r.jsxs)("div",{className:"mb-6 text-gray-600",children:["Showing ",a.length," of ",B," blogs"]}),N&&(0,r.jsx)("div",{className:"flex justify-center items-center py-20",children:(0,r.jsx)(h.A,{className:"h-8 w-8 animate-spin text-orange-500"})}),S&&!N&&(0,r.jsxs)("div",{className:"text-center py-20",children:[(0,r.jsx)("p",{className:"text-red-500 text-lg mb-4",children:S}),(0,r.jsx)(n.$,{onClick:L,variant:"outline",children:"Try Again"})]}),!N&&!S&&(0,r.jsxs)(r.Fragment,{children:[0===a.length?(0,r.jsxs)("div",{className:"text-center py-20",children:[(0,r.jsx)("p",{className:"text-gray-600 text-lg mb-4",children:"No blogs found"}),(0,r.jsx)(n.$,{onClick:()=>{$(""),_(""),e.push("/blogs")},variant:"outline",children:"Clear Filters"})]}):(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 lg:gap-8 mb-12",children:a.map(t=>{var a,s;return(0,r.jsxs)(c.Zp,{className:"group cursor-pointer overflow-hidden hover:shadow-xl transition-all duration-300 hover:-translate-y-2 border-2 border-gray-100 hover:border-orange-200",onClick:()=>e.push("/blogs/".concat(t.slug)),children:[t.featuredImage&&(0,r.jsx)("div",{className:"relative w-full h-48 overflow-hidden bg-gray-200",children:(0,r.jsx)(j.default,{src:t.featuredImage,alt:t.title,fill:!0,className:"object-cover group-hover:scale-110 transition-transform duration-300"})}),(0,r.jsxs)(c.Wu,{className:"p-6",children:[t.tags&&t.tags.length>0&&(0,r.jsx)("div",{className:"flex flex-wrap gap-2 mb-3",children:t.tags.slice(0,3).map(e=>(0,r.jsx)(d.E,{variant:"secondary",className:"text-xs bg-orange-100 text-orange-700 hover:bg-orange-200",children:e},e))}),(0,r.jsx)("h2",{className:"text-xl font-bold text-gray-900 mb-3 line-clamp-2 group-hover:text-orange-600 transition-colors",children:t.title}),t.excerpt&&(0,r.jsx)("p",{className:"text-gray-600 text-sm mb-4 line-clamp-3",children:t.excerpt}),(0,r.jsxs)("div",{className:"flex items-center justify-between text-sm text-gray-500 pt-4 border-t border-gray-100",children:[(0,r.jsx)("div",{className:"flex items-center gap-4",children:(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(x.A,{className:"h-4 w-4"}),(0,r.jsx)("span",{children:(a=t.publishedAt||t.createdAt)?new Date(a).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}):""})]})}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(u.A,{className:"h-4 w-4"}),(0,r.jsx)("span",{children:t.views||0})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(m.A,{className:"h-4 w-4"}),(0,r.jsx)("span",{children:t.likes||0})]})]})]}),(0,r.jsxs)("div",{className:"mt-3 text-sm text-gray-600",children:["By ","string"==typeof(s=t.author)?"Unknown Author":s.username||s.email||"Unknown Author"]})]})]},t._id)})}),R>1&&(0,r.jsxs)("div",{className:"flex justify-center items-center gap-2 mt-8",children:[(0,r.jsxs)(n.$,{variant:"outline",size:"sm",onClick:()=>G(E-1),disabled:1===E,className:"rounded-xl",children:[(0,r.jsx)(f.A,{className:"h-4 w-4 mr-1"}),"Previous"]}),Array.from({length:Math.min(5,R)},(e,t)=>{let a;return a=R<=5||E<=3?t+1:E>=R-2?R-4+t:E-2+t,(0,r.jsx)(n.$,{variant:E===a?"default":"outline",size:"sm",onClick:()=>G(a),className:E===a?"bg-orange-500 text-white rounded-xl":"rounded-xl",children:a},a)}),(0,r.jsxs)(n.$,{variant:"outline",size:"sm",onClick:()=>G(E+1),disabled:E===R,className:"rounded-xl",children:["Next",(0,r.jsx)(p.A,{className:"h-4 w-4 ml-1"})]})]})]})]})}),(0,r.jsx)(w.default,{})]})}function N(){return(0,r.jsx)(s.Suspense,{fallback:(0,r.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:(0,r.jsx)(h.A,{className:"h-8 w-8 animate-spin text-orange-500"})}),children:(0,r.jsx)(y,{})})}},51608:(e,t,a)=>{"use strict";a.d(t,{default:()=>o});var r=a(95155),s=a(21570),l=a(20063);let o=()=>{let e=(0,l.useRouter)(),t=(0,l.usePathname)();return(0,r.jsx)("nav",{className:"hidden md:block bg-gradient-to-r from-orange-400 to-orange-600 shadow-md transition-all duration-300 z-30",children:(0,r.jsxs)("div",{className:"flex items-center justify-end space-x-6 p-3",children:[(0,r.jsx)(s.$,{onClick:()=>e.push("/browse-interviewed-candidates"),className:"bg-white bg-opacity-20 text-white text-lg font-semibold hover:bg-white hover:text-orange-600 rounded-xl px-4 py-2 transition-all duration-300 ".concat("/browse-interviewed-candidates"===t?"border-b-4 border-white rounded-sm":""),"aria-label":"Browse Candidates",children:"Browse Candidates"}),(0,r.jsx)(s.$,{onClick:()=>e.push("/college-partnerships"),className:"bg-white bg-opacity-20 text-white text-lg font-semibold hover:bg-white hover:text-orange-600 rounded-xl px-4 py-2 transition-all duration-300 ".concat("/college-partnerships"===t?"border-b-4 border-white rounded-sm":""),"aria-label":"Colleges",children:"Colleges"}),(0,r.jsx)(s.$,{onClick:()=>e.push("/recruiter"),className:"bg-white bg-opacity-20 text-white text-lg font-semibold hover:bg-white hover:text-orange-600 rounded-xl px-4 py-2 transition-all duration-300 ".concat("/recruiter"===t?"border-b-4 border-white rounded-sm":""),"aria-label":"Talent Pool",children:"Recruiter"}),(0,r.jsx)(s.$,{onClick:()=>e.push("/talent-pool"),className:"bg-white bg-opacity-20 text-white text-lg font-semibold hover:bg-white hover:text-orange-600 rounded-xl px-4 py-2 transition-all duration-300 ".concat("/talent-pool"===t?"border-b-4 border-white rounded-sm":""),"aria-label":"Talent Pool",children:"Talent Pool"})]})})}},56952:(e,t,a)=>{"use strict";a.d(t,{BT:()=>c,Wu:()=>d,ZB:()=>i,Zp:()=>o,aR:()=>n});var r=a(95155),s=a(12115),l=a(31185);let o=s.forwardRef((e,t)=>
1{let{className:a,...s}=e;return(0,r.jsx)("div",{ref:t,className:(0,l.cn)("rounded-lg border border-gray-300 bg-card text-card-foreground shadow-sm",a),...s})});o.displayName="Card";let n=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,r.jsx)("div",{ref:t,className:(0,l.cn)("flex flex-col space-y-1.5 p-6",a),...s})});n.displayName="CardHeader";let i=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,r.jsx)("h3",{ref:t,className:(0,l.cn)("text-2xl font-semibold leading-none tracking-tight",a),...s})});i.displayName="CardTitle";let c=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,r.jsx)("p",{ref:t,className:(0,l.cn)("text-sm text-muted-foreground",a),...s})});c.displayName="CardDescription";let d=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,r.jsx)("div",{ref:t,className:(0,l.cn)("p-6 pt-0",a),...s})});d.displayName="CardContent",s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,r.jsx)("div",{ref:t,className:(0,l.cn)("flex items-center p-6 pt-0",a),...s})}).displayName="CardFooter"},84555:(e,t,a)=>{"use strict";a.d(t,{E:()=>n});var r=a(95155);a(12115);var s=a(83101),l=a(31185);let o=(0,s.F)("inline-flex items-center rounded-full border  px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function n(e){let{className:t,variant:a,...s}=e;return(0,r.jsx)("div",{className:(0,l.cn)(o({variant:a}),t),...s})}}},e=>{e.O(0,[2362,6711,3380,4777,5891,5209,2156,6630,4573,3598,2100,2619,9511,7093,5239,8100,7712,8515,7197,8441,1255,7358],()=>e(e.s=42268)),_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.