PageSourceSearch

https://lightsats.com/_next/static/chunks/pages/notifications-9d17bf0f2c72299e.js

js lightsats.com collected 2026-10-03 23:48:16 UTC 4,575 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8769],{81865:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/notifications",function(){return n(48658)}])},48658:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return I}});var r=n(47568),i=n(20414),c=n(85893),o=n(97501),s=n(64040),a=n(86979),d=n(28723),l=n(27690),u=n(8773),h=n(10154),p=n(60189),f=n(16221),j=n(45201),x=n(6939),w=n(64337),y=n(77137),m=n(33299),Z=n(12314),_=n(9008),k=n.n(_),g=n(34479),E=function(){var e=(0,Z.$G)("achievements").t,t=(0,m.useSession)().data,n=(0,w.z)(),r=n.data,i=n.mutate;return t&&r?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(k(),{children:(0,c.jsx)("title",{children:"Lightsats⚡ - Notifications"})}),(0,c.jsx)(s.Z,{align:"center",justify:"center",children:(0,c.jsx)(a.Z,{h4:!0,children:"\uD83D\uDD14 Notifications"})}),(0,c.jsx)(d.Z,{}),r.filter(function(e){return!e.read}).length>0&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(l.ZP,{auto:!0,color:"secondary",onClick:function(){return function(e,t){return C.apply(this,arguments)}(t.user.id,i)},children:"Mark all as read"}),(0,c.jsx)(d.Z,{})]}),(null==r?void 0:r.length)?(0,c.jsx)(u.ZP,{css:{width:"100%",dropShadow:"$sm",pt:0},children:(0,c.jsx)(u.ZP.Body,{css:{pt:"$sm"},children:r.map(function(n,o){var l=function(e,t){switch(e.type){case"LINK_EMAIL":return{title:"Connect an email address",description:"Get notified when your tips are claimed or withdrawn.",href:y.d.profile+"#"+g.connectedAccountsElementId};case"COMPLETE_PROFILE":return{title:"Complete your tipper profile",description:"Improve the authenticity of your tips.",href:y.d.profile};case"TIP_CLAIMED":return{title:"Your tip was claimed",description:"Good job, your recipient has started their Bitcoin journey!",href:"".concat(y.d.tips,"/").concat(e.tipId)};case"TIP_WITHDRAWN":return{title:"Your tip was withdrawn",description:"Nice work on the orange pill \uD83C\uDF4A\uD83D\uDC8A.",href:"".concat(y.d.tips,"/").concat(e.tipId)};case"ACHIEVEMENT_UNLOCKED":return{title:"Achievement unlocked: ".concat(t("".concat(e.achievementType,".title"))),description:t("".concat(e.achievementType,".description")),href:y.d.profile};case"TIP_RECLAIMED":return{title:"Your tip was automatically reclaimed",description:"Your tip expired without being withdrawn. Your sats have been returned back to you.",href:"".concat(y.d.tips,"/").concat(e.tipId)};case"AUTOMATIC_REFUND":return{title:"Sats returned",description:"Sats from reclaimed tips were sent to your lightning address.",href:"".concat(y.d.dashboard,"?withdrawalId=").concat(e.withdrawalId)};default:throw Error("Unsupported notification type: "+e.type)}}(n,e);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(d.Z,{y:.5}),(0,c.jsx)(j.p,{href:l.href,children:(0,c.jsx)("a",{style:{width:"100%"},onClick:function(){return function(e,t,n){return D.apply(this,arguments)}(t.user.id,n.id,i)},children:(0,c.jsxs)(s.Z,{align:"flex-start",children:[(0,c.jsx)(h.Z,{span:.75,css:{ta:"center"},children:!n.read&&(0,c.jsx)(p.ZP,{variant:"dot",color:"error"})}),(0,c.jsxs)(h.Z,{children:[(0,c.jsx)(s.Z,{align:"center",children:(0,c.jsx)(a.Z,{b:!0,children:l.title})}),(0,c.jsx)(s.Z,{children:(0,c.jsx)(a.Z,{children:l.description})}),(0,c.jsx)(s.Z,{children:(0,c.jsxs)(a.Z,{color:"$gray700",size:"small",children:[(0,x.Z)(new Date,new Date(n.created))," ","ago"]})})]})]})})}),(0,c.jsx)(d.Z,{y:.5}),o<r.length-1&&(0,c.jsx)(f.ZP,{})]})})})}):(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(s.Z,{justify:"center",children:(0,c.jsx)(a.Z,{children:"It looks like you don't have any notifications yet. Check back soon!"})})})]}):(0,c.jsx)(o.ZP,{})},I=!0;function C(){return(C=(0,r.Z)(function(e,t){var n;return(0,i.__generator)(this,function(r){switch(r.label){case 0:return[4,fetch("/api/users/".concat(e,"/notifications/markRead"),{method:"POST",headers:{"Content-Type":"application/json"}})];case 1:return(n=r.sent()).ok?t():console.error("Failed to mark notifications as read: "+n.status),[2]}})})).apply(this,arguments)}function D(){return(D=(0,r.Z)(function(e,t,n){var r;return(0,i.__generator)(this,function(i){switch(i.label){case 0:return[4,fetch("/api/users/".concat(e,"/notifications/").concat(t,"/markRead"),{method:"POST",headers:{"Content-Type":"application/json"}})];case 1:return(r=i.sent()).ok?n():console.error("Failed to mark notification as read: "+r.status),[2]}})})).apply(this,arguments)}t.default=E}},function(e){e.O(0,[1987,5721,385,6761,7536,1087,3931,594,6419,4479,97
174,2888,179],function(){return e(e.s=81865)}),_N_E=e.O()}]);
2//# sourceMappingURL=notifications-9d17bf0f2c72299e.js.map

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.