PageSourceSearch

https://www.fobsprep.in/_next/static/chunks/pages/user/discuss/[discussSlug]-13a3fd28fe88e82b.js

js fobsprep.in collected 2026-10-02 00:00:21 UTC 4,684 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5018],{57687:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/user/discuss/[discussSlug]",function(){return s(89882)}])},89882:function(e,t,s){"use strict";s.r(t),s.d(t,{__N_SSG:function(){return h}});var r=s(85893),a=s(9473),n=s(11163),i=s(35858),m=s(33244),d=s(1891),c=s(67294),l=s(9526),o=s(3464),u=s(79047);let f=e=>{let{pageData:t}=e,s=(0,m.T)(),f=(0,n.useRouter)(),h=(0,a.v9)(e=>e.user.LoggedInUser),p=(0,a.v9)(e=>e.baseStore.store);(0,a.v9)(e=>e.user.deviceType),(0,a.v9)(e=>e.user.isSidebarOpened);let[b,v]=(0,c.useState)([]),[_,x]=(0,c.useState)(!1),[j,w]=(0,c.useState)(!0),[N,g]=(0,c.useState)(!1),[S,y]=(0,c.useState)(""),[E,C]=(0,c.useState)(0),[D,O]=(0,c.useState)(null),{discussSlug:I}=f.query;i._n;let L=(0,c.useRef)(null);(0,c.useEffect)(()=>{f.isReady&&P()},[f.isReady]),(0,c.useEffect)(()=>{},[p]);let P=async()=>{var e="0";if(h&&h.user_id)e=h.user_id;else{var t=JSON.parse(localStorage.getItem("user"));t&&(e=t.user_id)}var s=await (0,d.siH)(I,e);s&&O(s)};(0,c.useEffect)(()=>{let e=new IntersectionObserver(e=>{e[0].isIntersecting&&j&&D&&D.forum_id&&R()},{threshold:1});return L.current&&e.observe(L.current),()=>{L.current&&e.unobserve(L.current)}},[L,N,j,D]);let R=()=>{if(x(!0),D&&D.forum_id){var e=b.length;(0,d.If9)(D.forum_id,e,10).then(async e=>{let t=await e.json();t&&t.data&&t.data.length?(v(t.data),g(!N),x(!1),C(E+1),t.data.length<10&&(w(!1),x(!1))):(w(!1),x(!1))}).catch(e=>{})}},T=e=>{if(e.preventDefault(),!e.target.comment.value){s((0,u.Lu)({summary:"Error",detail:"Please Enter a Comment to Continue",severity:"error",life:3e3,timeStamp:new Date().toString()}));return}let t=new FormData;t.append("forum_id",D.forum_id);var r="0";if(h&&h.user_id)r=h.user_id;else{var a=JSON.parse(localStorage.getItem("user"));a&&(r=a.user_id)}t.append("user_id",r),t.append("comment_description",e.target.comment.value),t.append("comment_parent_id","0"),t.append("comment_type",D.forum_type),t.append("comment_mcq_answers",""),fetch(i.sn+"/comments/create",{method:"POST",body:t}).then(t=>{200===t.status?(e.target.reset(),v([]),w(!0),x(!1),s((0,u.Lu)({summary:"Success",detail:"Your comment has been added successfully",severity:"success",life:3e3,timeStamp:new Date().toString()}))):s((0,u.Lu)({summary:"Error",detail:"Couldn't save the comment now, Please try in sometime",severity:"error",life:3e3,timeStamp:new Date().toString()}))}).catch(e=>{s((0,u.Lu)({summary:"Error",detail:"Couldn't save the comment now, Please try in sometime",severity:"error",life:3e3,timeStamp:new Date().toString()}))})};return(0,r.jsx)(r.Fragment,{children:t&&(0,r.jsxs)("div",{className:"container mb-4 pb-4",children:[(0,r.jsx)("h1",{className:"f-20 mt-3 mb-2 text-center f-b c-b",children:t.page_title}),(0,r.jsxs)(r.Fragment,{children:[D&&D.forum_title&&(0,r.jsx)(o.Z,{postObj:D,isDetailView:!0,isLoggedInCard:!0}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"f-b f-24 pt-3 mb-3",children:"Comments"}),(0,r.jsx)("div",{children:(0,r.jsxs)("form",{onSubmit:T,children:[(0,r.jsx)("textarea",{id:"comment",name:"comment",required:!0,placeholder:"Add a Review Comment",className:"c-b b-w p-25",style:{width:"100%",border:"1px solid #ced4da",borderRadius:"0.25rem",marginBottom:"10px"},rows:4}),(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),(0,r.jsx)("button",{className:"form-submit",type:"submit",children:"Submit"})]})}),b&&b.length>0&&(0,r.jsx)("div",{className:"mt-3 pt-3 pb-3",style:{borderTop:"1px solid #DDD"},children:b.map((e,t)=>(0,r.jsxs)("div",{className:"p-2",children:[(0,r.jsx)("div",{className:"d-flex",children:(0,r.jsx)("div",{className:"ml-2",children:(0,r.jsx)("p",{className:"c-b f-b mt-2 mb-1 f-14",children:e.comment_by?e.comment_by:"Guest user"})})}),(0,r.jsx)("div",{className:"d-flex mt-1",children:(0,r.jsx)("div",{className:"ml-2 f-14",style:{color:"#565959"},children:e.created_date})}),(0,r.jsx)("div",{className:"c-b mt-1 f-14",children:e.comment_description})]},"comment-"+t))}),_&&j&&(0,r.jsx)("div",{className:"border-round border-1 surface-border p-4 surface-card m-2 w-100p",children:(0,r.jsx)("div",{className:"row",children:(0,r.jsxs)("div",{className:"col-10",children:[(0,r.jsx)(l.Z,{width:"100%",className:"mb-2"}),(0,r.jsx)(l.Z,{width:"80%",className:"mb-2"}),(0,r.jsx)(l.Z,{width:"60%",className:"mb-2"}),(0,r.jsx)(l.Z,{width:"40%"})]})})}),!_&&j&&(0,r.jsx)("div",{ref:L,style:{height:"100px",width:"100%",minHeight:"200px"}}),!_&&!j&&0==b.length&&(0,r.jsx)("div",{className:"text-center f-b c-b f-24 mb-4",children:"No Comments Found"})]})]})]})})};var h=!0;t.default=f}},function(e){e.O(0,[9526,3464,9774,2888,179],function(){return e(e.s=57687)}),_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.