PageSourceSearch

https://www.ville-imphy.fr/component---theme-gatsby-theme-blank-sr…es-notifications-js-83c0420c4188cd3052bf.js

js ville-imphy.fr collected 2026-10-02 12:53:48 UTC 2,466 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunksite=self.webpackChunksite||[]).push([[984],{96772:function(t,e,n){n.r(e),n.d(e,{default:function(){return m}});var i=n(27378),a=n(26972),o=n(20030),s=n(9579);function r(t){if("undefined"!=typeof document){const e=document.createElement("textarea");return e.innerHTML=t,e.value}return null}const l=t=>{var e;let{notificationsData:n}=t;const{0:s,1:r}=(0,i.useState)(20);if(null===n)return null;let l,u;return l=n.slice(0,s),u=n.slice(s),i.createElement(a.Z,{message:"Notifications"},i.createElement(o.Z,{description:"Page affichant toutes les notifications envoyées",title:"Notifications"}),i.createElement("div",{className:"notifications-module--notifs-items-container--26314"},n?i.createElement(c,{notificationsData:l}):null,(null===(e=u)||void 0===e?void 0:e.length)>0&&i.createElement("div",{className:"voirPlus"},i.createElement("span",{role:"button",tabIndex:0,onClick:()=>r(s+20),onKeyPress:t=>{"Enter"===t.key&&r(s+20)},className:"btn"},"Voir plus"))))},c=t=>{let{notificationsData:e}=t;return 0===e.length?i.createElement("p",{style:{margin:"0 2rem"}},"Pas de contenu à afficher."):i.createElement(i.Fragment,null,e.map((t=>i.createElement(u,{key:t.id,notif:t}))))},u=t=>{let{notif:e}=t;const n=new Date(e.attributes.created).toLocaleDateString();return"/"==e.attributes.url&&(e.attributes.url+="notifications"),i.createElement("div",{className:"notifications-module--notif-item--89a9a"},e.attributes.image&&i.createElement(s.Z,{arialabel:e.attributes.titre,link:e.attributes.url},i.createElement("img",{src:e.attributes.image})),i.createElement("div",{className:"notifications-module--notification-infos--28b5d"},i.createElement("div",{className:"notifications-module--notification-date--dbc33"},"envoyé le ",n),i.createElement("h2",{className:"notifications-module--notification-title--2bc43"},i.createElement(s.Z,{link:e.attributes.url},e.attributes.titre)),i.createElement("div",{className:"notifications-module--notification-resume--5be32",dangerouslySetInnerHTML:{__html:null==e.attributes.contenu?"":r(e.attributes.contenu.processed)}})))};var m=()=>{const{0:t,1:e}=(0,i.useState)(null);return(0,i.useEffect)((()=>{fetch("https://0000003413.web.arnia-bfc.fr/jsonapi/notification/notification?sort=-created").then((t=>t.json())).then((t=>{e(t.data)}))}),[e]),i.createElement(l,{notificationsData:t})}}}]);
2//# sourceMappingURL=component---theme-gatsby-theme-blank-src-pages-notifications-js-83c0420c4188cd3052bf.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.