OwlCyberSecurity - MANAGER
Edit File: 1495.b45bb862bd3e18ec.js
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1495],{21495:function(t,e,a){a.r(e);var n=a(57437),r=a(55731),s=a(50400),l=a(90638),c=a(88735),o=a(98110),h=a(45311),i=a(1268),p=a(54467),u=a(39028),g=a(2265),d=a(32603),f=a(99376);e.default=function(){let t=(0,d.I0)(),e=(0,f.usePathname)(),a=e.startsWith("/industrial-parts")||e.startsWith("/car-parts"),v=(0,d.v9)(r.vn),m=(0,d.v9)(h.lS),b=(0,d.v9)(u.GM),_=(0,d.v9)(i.c0),w=(0,d.v9)(l._1),k=(0,d.v9)(p.el),x=(0,d.v9)(c.Zr),j=(0,d.v9)(o.er);return(0,g.useEffect)(()=>{!function(){let e=localStorage.getItem("token");if(e){var a=new Headers;a.append("Accept","application/json"),a.append("Authorization","Bearer ".concat(e)),fetch("".concat("https://app.charsooq.com/api/v1/","profile"),{method:"GET",headers:a}).then(t=>t.json()).then(e=>{200===e.status&&(localStorage.setItem("user_info",JSON.stringify(e.data)),t((0,s.Ib)(e.data)),t((0,s.sc)(e.data.wallet_balance)))}).catch(t=>console.log("error",t))}}()},[]),(0,n.jsx)("span",{className:"absolute flex items-center justify-center text-white bg-[var(--base-red)] w-5 h-5 rounded-full text-[12px] ".concat(a?"top-5 right-4":"top-3 right-3 md:top-0 md:right-2"),children:v.length+m.length+b.length+_.length+w.length+k.length+x.length+j.length})}}}]);