1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[575],{81070:function(e,s,a){a.d(s,{Z:function(){return t}});var r=a(85893),n=a(9008),i=a(11163);function t(e){var s=e.title,a=e.description,t=e.image,l=e.url,c=(0,i.useRouter)(),d="".concat("https://naijabarrister.com").concat(c.asPath);return(0,r.jsxs)(n.default,{children:[(0,r.jsx)("title",{children:s?"".concat(s," - ").concat("NaijaBarrister | Find verified lawyers in Nigeria"):"NaijaBarrister | Find verified lawyers in Nigeria"}),(0,r.jsx)("meta",{name:"description",content:a||"Providing easy access to Nigerian laws, lawyers and legal resources. Naijabarrister.com is managed by Legalhub Associates and Solutions Ltd, a limited liability company registered in Nigeria"}),(0,r.jsx)("meta",{name:"robots",content:"noindex,nofollow"}),(0,r.jsx)("meta",{property:"og:type",content:"article"}),(0,r.jsx)("meta",{property:"og:image",content:t||"".concat("https://naijabarrister.com","/images/logo.png")}),(0,r.jsx)("meta",{property:"og:url",content:l||d}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,r.jsx)("meta",{property:"og:site_name",content:"NaijaBarrister | Find verified lawyers in Nigeria"}),(0,r.jsx)("meta",{name:"robots",content:"index,follow"})]})}},80575:function(e,s,a){a.d(s,{Z:function(){return k}});var r=a(34051),n=a.n(r),i=a(85893),t=a(67294),l=a(11163),c=a(2282),d=a(41664),o=a(25675),h=a(74931),x=a(40611),u=a(4663),m=a(51649),j=a(89583);function f(e,s,a,r,n,i,t){try{var l=e[i](t),c=l.value}catch(d){return void a(d)}l.done?s(c):Promise.resolve(c).then(r,n)}var p=function(e){var s=e.user,a=(0,l.useRouter)(),r=(0,t.useState)(!1),p=r[0],b=r[1],v=(0,c.a)().setUser,g=function(){var e,s=(e=n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,x.Z.get("/api/users/logout");case 3:e.sent.data,h.ZP.success("You have been logged out"),a.push("/"),v(null),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.error(e.t0),h.ZP.error("Error logging you out, please try again");case 13:case"end":return e.stop()}}),e,null,[[0,9]])})),function(){var s=this,a=arguments;return new Promise((function(r,n){var i=e.apply(s,a);function t(e){f(i,r,n,t,l,"next",e)}function l(e){f(i,r,n,t,l,"throw",e)}t(void 0)}))});return function(){return s.apply(this,arguments)}}();return(0,i.jsxs)("div",{className:"dashboard-navbar fixed top-0 left-0 right-0 w-screen z-30 md:py-4 py-3 bg-white border-b border-slate-200",children:[(0,i.jsxs)("nav",{className:"flex justify-between items-center max-w-7xl w-full mx-auto px-4",children:[(0,i.jsxs)("div",{className:"md:mr-2 md:ml-48 md:w-auto w-full flex items-center justify-between",children:[(0,i.jsx)("div",{className:"md:pl-0 pl-2",children:(0,i.jsx)(d.default,{href:"/",children:(0,i.jsx)("a",{className:"text-slate-800 text-xl",children:(0,i.jsx)(o.default,{src:"/images/logo.svg",alt:"NaijaBarrister",width:120,height:48})})})}),(0,i.jsx)("button",{className:"md:hidden block text-slate-700",onClick:function(){return b(!p)},children:(0,i.jsx)(m.tgG,{size:"2em"})})]}),(0,i.jsx)("div",{className:"md:block hidden",children:s&&(0,i.jsx)("ul",{className:"flex items-center space-x-4",children:!s.is_verified&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("li",{children:(0,i.jsx)(u.Z,{user:s,path:"/dashboard/profile"})}),(0,i.jsx)("li",{children:(0,i.jsx)("a",{onClick:g,className:"cursor-pointer text-slate-700 font-bold",children:"Logout"})})]})})})]}),p&&(0,i.jsxs)("div",{className:"fixed inset-0 h-screen w-screen bg-gray-900",children:[(0,i.jsxs)("div",{className:"py-6 px-6 flex items-center justify-between",children:[(0,i.jsx)("h4",{className:"text-white text-2xl uppercase font-bold",children:"Menu"}),(0,i.jsx)("button",{className:"text-lg text-white",onClick:function(){return b(!p)},children:(0,i.jsx)(j.aHS,{})})]}),s&&(0,i.jsx)("ul",{className:"mobile-dashboard-menu",children:!s.is_verified&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("li",{children:(0,i.jsx)(d.default,{href:"/",children:(0,i.jsx)("a",{className:"".concat("/"===a.pathname?"is-active":""),children:"Home"})})}),(0,i.jsx)("li",{children:(0,i.jsx)(d.default,{href:"/dashboard",children:(0,i.jsx)("a",{className:"".concat("/dashboard"===a.pathname?"is-active":""),children:"Dashboard"})})}),(0,i.jsx)("li",{children:(0,i.jsx)(d.default,{href:"/dashboard/briefs",children:(0,i.jsx)("a",{className:"".concat("/dashboard/briefs"===a.pathname?"is-active":""),children:"Briefs"})})}),(0,i.jsx)("li",{children:(0,i.jsx)(d.default,{href:"/dashboard/forum",children:(0,i.jsx)("a",{className:"".concat("/dashboard/forum"===a.pathname?"is-active":""),children:"Communities"})})}),(0,i.jsx)("li",{children:(0,i.jsx)(d.default,{href:"/dashboard/jobs",children:(0,i.jsx)("a",{className:"".concat("/dashboard/jobs"===a.pathname?"is-active":""),children:"Jobs"})})}),(0,i.jsx)("li",{children:(0,i.jsx)(d.default,{href:"/dashboard/articles",children:(0,i.jsx)("a",{className:"".concat("/dashboard/articles"===a.pathname?"is-active":""),children:"Articles"})})}),(0,i.jsx)("li",{children:(0,i.jsx)(d.default,{href:"/dashboard/questions",children:(0,i.jsx)("a",{className:"".concat("/dashboard/questions"===a.pathname?"is-active":""),children:"Questions"})})}),(0,i.jsx)("li",{children:(0,i.jsx)(d.default,{href:"/dashboard/jobs",children:(0,i.jsx)("a",{className:"".concat("/dashboard/jobs"===a.pathname?"is-active":""),children:"Jobs"})})}),(0,i.jsx)("li",{children:(0,i.jsx)("a",{onClick:g,className:"cursor-pointer",children:"Logout"})}),(0,i.jsx)("li",{children:(0,i.jsx)(u.Z,{user:s,path:"/dashboard/profile"})})]})})]})]})},b=a(81070),v=a(8193),g=a(47516),N=a(66653),w=a(63750);function y(e,s,a,r,n,i,t){try{var l=e[i](t),c=l.value}catch(d){return void a(d)}l.done?s(c):Promise.resolve(c).then(r,n)}var k=function(e){var s=e.children,a=e.title,r=e.action,h=e.actionTitle,x=e.subTitle,u=void 0===x?null:x,m=e.isAdmin,f=void 0!==m&&m,k=e.showHeader,_=void 0===k||k,C=(0,c.a)(),F=C.user,P=C.loading,Z=C.setUser,A=(0,l.useRouter)();if((0,t.useEffect)((function(){P||(F||A.push("/login?next=".concat(A.asPath)),f&&"admin"!==F.role&&A.push("/dashboard"))}),[P,F]),P)return null;var B=function(){var e,s=(e=n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,axiosClient.get("/api/users/logout");case 3:e.sent.data,toast.success("You have been logged out"),A.push("/"),Z(null),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),console.error(e.t0),toast.error("Error logging you out, please try again");case 13:case"end":return e.stop()}}),e,null,[[0,9]])})),function(){var s=this,a=arguments;return new Promise((function(r,n){var i=e.apply(s,a);function t(e){y(i,r,n,t,l,"next",e)}function l(e){y(i,r,n,t,l,"throw",e)}t(void 0)}))});return function(){return s.apply(this,arguments)}}();return(0,i.jsx)(i.Fragment,{children:!P&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(b.Z,{title:a||"Dashboard"}),(0,i.jsx)("main",{className:"",children:(0,i.jsx)("div",{className:"bg-slate-100",children:(0,i.jsx)("div",{children:(null===F||void 0===F?void 0:F.is_verified)?(0,i.jsx)("div",{children:(0,i.jsx)("div",{className:"p-4 bg-white rounded-md border border-slate-200",children:(0,i.jsx)("p",{className:"mb-0",children:"Your account is yet to be verified, please check back later."})})}):(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:"md:grid grid-cols-12",children:[(0,i.jsxs)("nav",{className:"h-screen md:flex hidden col-span-2 bg-[#6060AD] p-4 px-6 flex relative z-[99] flex-col justify-between",children:[(0,i.jsx)("div",{className:"flex items-center w-full",children:(0,i.jsx)(o.default,{src:"/images/icon-white.png",alt:"NaijaBarrister",width:48,height:48,className:"align-center"})}),(0,i.jsx)("div",{className:"sidebar-menu",children:F&&(0,i.jsx)("ul",{className:"",children:!F.is_verified&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("li",{children:(0,i.jsx)(d.default,{href:"/dashboard",children:(0,i.jsxs)("a",{className:"".concat("/dashboard"===A.pathname?"is-active":""),children:[(0,i.jsx)(g.OKt,{}),(0,i.jsx)("span",{children:"Home"})]})})}),(0,i.jsx)("li",{children:(0,i.jsx)(d.default,{href:"/dashboard/questions",children:(0,i.jsxs)("a",{className:"".concat("/dashboard/questions"===A.pathname?"is-active":""),children:[(0,i.jsx)(v.KpA,{}),(0,i.jsx)("span",{children:"Questions"})]})})}),(0,i.jsx)("li",{children:(0,i.jsx)(d.default,{href:"/dashboard/forum",children:(0,i.jsxs)("a",{className:"".concat("/dashboard/forum"===A.pathname?"is-active":""),children:[(0,i.jsx)(w.YAB,{}),(0,i.jsx)("span",{children:"Communities"})]})})}),(0,i.jsx)("li",{children:(0,i.jsx)(d.default,{href:"/dashboard/briefs",children:(0,i.jsxs)("a",{className:"".concat("/dashboard/briefs"===A.pathname?"is-active":""),children:[(0,i.jsx)(g.RU8,{}),(0,i.jsx)("span",{children:"Briefs"})]})})}),(0,i.jsx)("li",{children:(0,i.jsx)(d.default,{href:"/dashboard/jobs",children:(0,i.jsxs)("a",{className:"".concat("/dashboard/jobs"===A.pathname?"is-active":""),children:[(0,i.jsx)(v.SRW,{}),(0,i.jsx)("span",{children:"Jobs"})]})})}),(0,i.jsx)("li",{children:(0,i.jsx)(d.default,{href:"/dashboard/articles",children:(0,i.jsxs)("a",{className:"".concat("/dashboard/articles"===A.pathname?"is-active":""),children:[(0,i.jsx)(g.$mu,{}),(0,i.jsx)("span",{children:"Articles"})]})})}),(0,i.jsx)("li",{children:(0,i.jsx)(d.default,{href:"/dashboard/contacts",children:(0,i.jsxs)("a",{className:"".concat("/dashboard/contacts"===A.pathname?"is-active":""),children:[(0,i.jsx)(N.Coy,{}),(0,i.jsx)("span",{children:"Contacts"})]})})})]})})}),(0,i.jsx)("div",{children:(0,i.jsxs)("a",{onClick:B,className:"text-white cursor-pointer hover:text-white flex items-center space-x-2 block px-5 py-2 rounded-lg hover:no-underline hover:bg-blue-400",children:[(0,i.jsx)(j.d7k,{})," ",(0,i.jsx)("span",{children:"Logout"})]})})]}),(0,i.jsxs)("div",{className:"h-screen overflow-y-scroll col-span-10",children:[(0,i.jsx)(p,{user:F}),(0,i.jsxs)("div",{className:"md:max-w-[95%] py-32 md:mx-auto px-4",children:[_&&(0,i.jsxs)("div",{className:"flex items-center justify-between mb-8",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("h1",{className:"text-4xl font-black",children:a}),u?(0,i.jsx)("p",{children:u}):null]}),(0,i.jsx)("div",{className:"flex items-center space-x-4",children:r&&(0,i.jsx)("div",{children:(0,i.jsx)(d.default,{href:r,children:(0,i.jsx)("a",{rel:"noreferrer",className:"inline-block text-sm py-2 px-4 roun
1ded-lg bg-white border border-blue-500 hover:drop-shadow-sm hover:no-underline hover:bg-slate-50 font-bold text-blue-800 hover:text-blue-900",children:h||"Add new"})})})})]}),s]})]})]})})})})})]})})}},4663:function(e,s,a){var r=a(85893),n=(a(67294),a(41664)),i=a(25675);s.Z=function(e){var s=e.user,a=e.path;return(0,r.jsx)(n.default,{href:a||"/dashboard",children:(0,r.jsxs)("a",{className:"text-slate-700 flex items-center rounded-full space-x-2 hover:text-slate-600 hover:no-underline",children:[(0,r.jsx)("div",{className:"relative inline top-1",children:(0,r.jsx)(i.default,{src:s.avatar||"/images/avatar.png",width:24,height:24,className:"object-cover rounded-full",alt:s.username})}),(0,r.jsxs)("span",{className:"font-bold",children:[s.first_name," ",s.last_name]})]})})}}}]);
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.