1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6159],{62030:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});var n=t(67926),r=t(13882);function a(e,s){return(0,r.Z)(1,arguments),(0,n.Z)(e,Date.now(),s)}},1165:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/questions/[slug]",function(){return t(22081)}])},10115:function(e,s,t){"use strict";var n=t(34051),r=t.n(n),a=t(85893),l=t(25675),i=t(41664),c=t(67294),o=t(40611),u=t(11510),d=t(27856),x=t.n(d),h=t(66653),m=t(74931);function f(e,s,t,n,r,a,l){try{var i=e[a](l),c=i.value}catch(o){return void t(o)}i.done?s(c):Promise.resolve(c).then(n,r)}function p(e){return function(){var s=this,t=arguments;return new Promise((function(n,r){var a=e.apply(s,t);function l(e){f(a,n,r,l,i,"next",e)}function i(e){f(a,n,r,l,i,"throw",e)}l(void 0)}))}}s.Z=function(e){var s=e.response,t=e.question,n=e.user,d=(0,c.useState)(null),f=d[0],v=d[1],j=(0,c.useState)(null),b=j[0],N=j[1],g=(0,c.useState)(s.upvotes.length||0),w=g[0],y=g[1];(0,c.useEffect)((function(){var e=x().sanitize(s.answer);N(e)}),[b]),(0,c.useEffect)((function(){function e(){return(e=p(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.Z.get("/api/users/".concat(s.user));case 3:t=e.sent.data,v(t),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[null===f||void 0===f?void 0:f.id]),(0,c.useEffect)((function(){}),[w]);var _=function(){var e=p(r().mark((function e(){var a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,o.Z.post("/api/questions/".concat(t.id,"/responses/").concat(s._id,"/upvote"));case 3:a=e.sent.data,y(a.upvotes.length),a.upvotes.filter((function(e){return n.id===e.user})).length>0?m.ZP.success("Upvoted"):m.ZP.success("Upvote removed"),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0),m.ZP.error("Upvote Error: Please try again");case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}();return(0,a.jsxs)("div",{className:"p-6",children:[f&&(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(l.default,{src:f.avatar||"/images/avatar.png",alt:f.fullname,width:36,height:36,className:"object-cover rounded-full"}),(0,a.jsxs)("div",{className:"ml-3",children:[(0,a.jsx)("h4",{className:"flex items-end",children:(0,a.jsx)(i.default,{href:"/".concat(f.username),children:(0,a.jsx)("a",{target:"_blank",className:"text-slate-800 font-bold",children:f.fullName})})}),(0,a.jsxs)("span",{className:"block text-sm text-slate-500",children:["Answered ",(0,u.Z)(new Date(s.createdAt),"PPP")]})]})]}),(0,a.jsx)("div",{className:"mt-4 whitespace-pre-line",dangerouslySetInnerHTML:{__html:b}}),(0,a.jsx)("div",{className:"mt-6",children:(0,a.jsxs)("button",{onClick:_,type:"button",className:"flex rounded-full py-1 px-3 items-center space-x-3 border border-slate-200 text-sm text-slate-800 bg-slate-100 hover:bg-slate-200",children:[(0,a.jsx)(h.KhA,{size:"1.2em",className:"mr-1"})," ",w," Upvote"]})}),(0,a.jsx)("span",{className:"text-xs text-slate-400 block mt-3 italic",children:"DISCLAIMER: This response is not legal advice. To obtain legal advice please consult a lawyer"})]})}},44449:function(e,s,t){"use strict";var n=t(85893),r=(t(67294),t(14161)),a=t(49778);s.Z=function(){return(0,n.jsxs)("aside",{className:"",children:[(0,n.jsx)("p",{className:"mb-4 text-slate-700",children:"Naijabarrister.com is committed to providing easy access to Nigerian laws, lawyers and legal resources"}),(0,n.jsxs)("ul",{className:"space-y-4",children:[(0,n.jsx)("li",{children:(0,n.jsx)(r.Z,{className:"w-full"})}),(0,n.jsx)("li",{children:(0,n.jsx)(a.Z,{})})]})]})}},14161:function(e,s,t){"use strict";var n=t(85893),r=(t(67294),t(41664)),a=t(79352);s.Z=function(){return(0,n.jsx)(r.default,{href:"/questions",children:(0,n.jsxs)("a",{className:"bg-blue-500 inline-flex items-center py-3 px-8 rounded-md md:mr-4 uppercase text-white font-bold drop-shadow-lg hover:text-white hover:no-underline hover:bg-blue-400 md:w-auto w-full justify-center md:mb-0 mb-4",children:[(0,n.jsx)(a.qvv,{className:"mr-2",size:"1.2em"})," Ask a lawyer"]})})}},49778:function(e,s,t){"use strict";var n=t(85893),r=(t(67294),t(86893)),a=t(41664);s.Z=function(){return(0,n.jsx)(a.default,{href:"/find-a-lawyer",children:(0,n.jsxs)("a",{className:"bg-white inline-flex items-center py-3 px-8 rounded-md uppercase text-blue-800 font-bold drop-shadow-sm border border-blue-400 hover:no-underline hover:border-blue-300 hover:text-slate-800 md:w-auto w-full justify-center",children:[(0,n.jsx)(r.jRj,{className:"mr-2"})," Find a lawyer"]})})}},22081:function(e,s,t){"use strict";t.r(s),t.d(s,{__N_SSP:function(){return f},default:function(){return p}});var n=t(85893),r=t(27856),a=t.n(r),l=t(65357),i=t(62030),c=t(10115),o=t(2282),u=t(41664),d=t(44449),x=t(67294),h=t(11163),m=t(89583),f=!0;function p(e){var s=e.question,t=(0,o.a)(),r=t.user,f=t.loading,p=(0,x.useState)(null),v=p[0],j=p[1],b=(0,h.useRouter)();return(0,x.useEffect)((function(){var e=a().sanitize(s.question);j(e)}),[v]),(0,n.jsxs)(l.Z,{title:s.question.slice(0,48),children:[(0,n.jsx)("div",{className:"bg-slate-800 pt-36 pb-12 px-4",children:b&&"true"===b.query.is_new?(0,n.jsxs)("div",{className:"max-w-6xl mx-auto text-center py-12",children:[(0,n.jsx)("div",{className:"mb-4",children:(0,n.jsx)(m.FJM,{size:"4em",className:"mx-auto text-green-500"})}),(0,n.jsx)("p",{className:"text-lg text-slate-100 max-w-lg mx-auto",children:"You have successfully asked your question. You will receive an email notification when a lawyer responds to your question"}),(0,n.jsx)("p",{children:(0,n.jsx)(u.default,{href:"/",children:(0,n.jsx)("a",{className:"text-blue-400 font-bold underline",children:"Click here to go back"})})})]}):(0,n.jsxs)("div",{className:"max-w-6xl mx-auto",children:[(0,n.jsxs)("span",{className:"text-green-400 block mb-2",children:["Question asked"," ",(0,i.Z)(new Date(s.createdAt),{addSuffix:!0})]}),(0,n.jsx)("div",{className:"text-lg text-slate-100",dangerouslySetInnerHTML:{__html:v}})]})}),(0,n.jsx)("div",{className:"py-24 pt-12 px-4",children:(0,n.jsxs)("div",{className:"max-w-6xl mx-auto md:grid grid-cols-12 gap-8",children:[(0,n.jsxs)("div",{className:"col-span-8",children:[(0,n.jsxs)("h4",{className:"font-black text-2xl mb-4 px-6",children:[s.responses.length," Response",s.responses.length>
11?"s":""]}),s.responses.length>0?(0,n.jsx)("div",{children:s.responses.map((function(e){return(0,n.jsx)(c.Z,{response:e,question:s,user:r},e._id)}))}):(0,n.jsx)("div",{children:"No response yet"}),(0,n.jsx)("div",{className:"px-6 pt-3 mt-3 border-t-2 border-slate-200",children:f||r?(0,n.jsxs)("p",{children:[(0,n.jsx)(u.default,{href:"/dashboard/questions/".concat(s.slug),children:(0,n.jsx)("a",{children:"Click here"})})," ","to respond to this question"]}):(0,n.jsxs)("p",{children:[(0,n.jsx)(u.default,{href:"/login",children:(0,n.jsx)("a",{children:"Login"})})," ","or"," ",(0,n.jsx)(u.default,{href:"/signup",children:(0,n.jsx)("a",{children:"Sign up"})})," ","to respond to this question"]})})]}),(0,n.jsx)("div",{className:"col-span-4 md:mt-24 mt-8",children:(0,n.jsx)(d.Z,{})})]})})]})}}},function(e){e.O(0,[5445,2013,9866,5937,3276,2175,6653,1510,6893,7856,7926,5357,9774,2888,179],(function(){return s=1165,e(e.s=s);var s}));var s=e.O();_N_E=s}]);
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.