1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="85914571-9d9d-4bbc-92f6-d09c69fc53b3",e._sentryDebugIdIdentifier="sentry-dbid-85914571-9d9d-4bbc-92f6-d09c69fc53b3")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4451],{68249:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/saved-push-notifications",function(){return t(22427)}])},22427:function(e,n,t){"use strict";t.r(n);var i=t(32670),r=t(24022),c=t(87963),s=t(22970),o=t(52322),d=t(2784),a=t(51195),u=t(90838),l=t(11511),f=t(12115),h=t(50075),x=t(64626),j=t(70969),p=t(27104),_=t(36908),Z=t(12956),b=t(82876),y=t(38677),g=t(97729),v=t.n(g),m=t(3865),N=t(52546);n.default=function(){var e,n=(0,c._)((0,d.useState)(!1),2),t=n[0],g=n[1],w=(0,c._)((0,d.useState)(1),2),E=w[0],C=w[1],k=(0,c._)((0,d.useState)(1),2),S=k[0],D=k[1],I=(0,b.useRouter)(),T=(0,c._)((0,d.useState)([]),2),A=T[0],P=T[1],B=(0,c._)((0,d.useState)([]),2),F=B[0],O=B[1];(0,d.useEffect)(function(){R()},[]);var R=(e=(0,i._)(function(){var e;return(0,s.Jh)(this,function(n){switch(n.label){case 0:g(!0),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,a.RZ.collection("pushNotifications").get()];case 2:return P(e=n.sent().docs.map(function(e){return(0,r._)({id:e.id},e.data())})),D(Math.ceil(e.length/10)),C(1),[3,4];case 3:return console.error("Error fetching all data:",n.sent()),[3,4];case 4:return g(!1),[2]}})}),function(){return e.apply(this,arguments)});(0,d.useEffect)(function(){var e=(E-1)*10,n=e+10;O(A.slice(e,n))},[A,E]);var deleteNotification=function(e){(0,N.eN)(e).then(function(){C(1),R()})};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(v(),{children:(0,o.jsx)("title",{children:"CareerFairy | Admin Saved Notifications Table"})}),(0,o.jsx)(m.Z,{children:(0,o.jsxs)("div",{style:{padding:10},children:[(0,o.jsx)("h1",{children:"Push Notifications"}),(0,o.jsx)(y.Z,{variant:"contained",style:{marginBottom:20},onClick:function(){return I.push("/admin/create-notification")},children:"Create New Notification"}),t?(0,o.jsx)(u.Z,{}):(0,o.jsx)(l.Z,{component:f.Z,children:(0,o.jsxs)(h.Z,{component:"table",children:[(0,o.jsx)(x.Z,{children:(0,o.jsxs)(j.Z,{children:[(0,o.jsx)(p.Z,{children:"Title"}),(0,o.jsx)(p.Z,{children:"Body"}),(0,o.jsx)(p.Z,{children:"Created At"}),(0,o.jsx)(p.Z,{children:"Actions"})]})}),(0,o.jsx)(_.Z,{children:F.map(function(e){var n;return(0,o.jsxs)(j.Z,{children:[(0,o.jsx)(p.Z,{children:e.title}),(0,o.jsx)(p.Z,{children:e.body}),(0,o.jsx)(p.Z,{children:null===(n=e.createdAt)||void 0===n?void 0:n.toDate().toLocaleString()}),(0,o.jsxs)(p.Z,{children:[(0,o.jsx)(y.Z,{onClick:function(){return I.push("/admin/create-notification?id=".concat(e.id))},children:"Edit"}),(0,o.jsx)(y.Z,{onClick:function(){return deleteNotification(e.id)},children:"Delete"})]})]},e.id)})})]})}),(0,o.jsx)(Z.Z,{count:S,page:E,onChange:function(e,n){C(n)},color:"primary",style:{marginTop:"20px"}})]})})]})}}},function(e){e.O(0,[8421,2212,5925,4381,2956,8507,633,6050,6659,6262,1171,3865,36,9774,2888,179],function(){return e(e.s=68249)}),_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.