PageSourceSearch

https://posthog.com/component---src-pages-community-notifications-tsx-c09521564f805d100745.js

js posthog.com collected 2026-10-01 08:27:14 UTC 4,145 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkposthog_com=self.webpackChunkposthog_com||[]).push([[1145],{94341:function(e,t,r){r.r(t),r.d(t,{default:function(){return w}});var i=r(19371),s=r(86654),n=r(13630),a=r(30758),c=r(83795),o=r(2212),l=r(40232),d=r.n(l),m=r(34298),p=r.n(m),x=r(88736),u=r.n(x),f=r(49271),h=r(46542),b=r(63629),j=r(8462),v=r(86070);function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach(function(t){(0,i.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}d().extend(p()),d().extend(u());const N=e=>{let{url:t,title:r,excerpt:i,date:s,count:n,onDismiss:a}=e;return(0,v.jsx)("li",{children:(0,v.jsxs)("div",{className:"relative group active:bg-light dark:active:bg-dark border border-b-3 border-transparent hover:border hover:translate-y-[-1px] active:translate-y-[1px] active:transition-all active:before:h-[2px] active:before:bg-light dark:active:before:bg-dark active:before:absolute active:before:content-[''] active:before:top-[-3px] active:before:left-0 active:before:right-0 rounded px-2 py-1.5 -mt-1.5 mx-[-2px] -mb-3",children:[(0,v.jsx)(o.A,{to:t,className:"flex items-center text-inherit hover:text-inherit",state:{previous:{title:"Notifications",url:"/community/notifications"}},children:(0,v.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,v.jsx)("div",{className:"flex items-center space-x-4",children:(0,v.jsxs)("div",{className:"w-full",children:[(0,v.jsx)("span",{className:"text-sm text-red dark:text-yellow line-clamp-1",children:r}),i&&(0,v.jsx)("div",{className:"flex items-center text-sm space-x-1 text-primary group",children:(0,v.jsx)("div",{className:"text-primary dark:text-primary-dark font-medium opacity-60 group-hover:opacity-100 line-clamp-1",children:i})})]})}),(0,v.jsxs)("div",{className:"flex-shrink-0 text-sm font-normal text-right flex items-center space-x-4",children:[(0,v.jsxs)("p",{className:"m-0 text-sm font-bold text-red",children:["+",n]}),(0,v.jsx)("div",{className:"text-primary dark:text-primary-dark font-medium opacity-60 line-clamp-2",children:d()(s).fromNow()})]})]})}),(0,v.jsx)("button",{onClick:a,className:"flex-shrink-0 absolute top-0 right-0 -translate-y-1/2 translate-x-1/2 size-7 border border-primary bg-white dark:bg-accent-dark dark:border-dark rounded-full group-hover:flex justify-center items-center hidden",children:(0,v.jsx)(h.A,{content:"Dismiss",placement:"top",children:(0,v.jsx)("span",{className:"relative",children:(0,v.jsx)(f.IconX,{className:"size-4"})})})})]})})},k=e=>{let{id:t,subject:r,activeAt:i,permalink:s,replies:n,date:a}=e;const{notifications:o,setNotifications:l}=(0,c.Jd)(),m=n.filter(e=>d()(e.updatedAt).isSameOrAfter(d()(a))).length;return(0,v.jsx)(N,{title:r,excerpt:"Question",date:i,url:"/questions/"+s,count:m+" new repl"+(1===m?"y":"ies"),onDismiss:async()=>{const e=o.filter(e=>e.question.id!==t);l(e)}})};function w(){const{fetchUser:e,notifications:t}=(0,c.Jd)();return(0,a.useEffect)(()=>{e().then(e=>{e||(0,b.navigate)("/community")}).catch(()=>(0,b.navigate)("/community"))},[]),(0,v.jsxs)(s.A,{parent:n.BS,children:[(0,v.jsx)(j.Ay,{title:"Notifications - PostHog"}),(0,v.jsxs)("section",{className:"py-12 mb-12 px-5 max-w-screen-mdlg mx-auto",children:[(0,v.jsx)("h1",{children:"Notifications"}),(null==t?void 0:t.length)>0?(0,v.jsx)("ul",{className:"list-none m-0 p-0 space-y-4 mt-6",children:t.map((e,t)=>e.question?(0,v.jsx)(k,g(g({},e.question),{},{date:e.date}),t):null)}):(0,v.jsx)("div",{className:"p-4 bg-accent rounded-md border border-input",children:(0,v.jsx)("h5",{className:"m-0",children:"New notifications will appear here"})})]})]})}}}]);
2//# sourceMappingURL=component---src-pages-community-notifications-tsx-c09521564f805d100745.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.