PageSourceSearch

https://www.isthmian.co.uk/assets/ContactsList-CBlRxBOz.js

js isthmian.co.uk collected 2026-09-24 23:27:19 UTC 2,859 bytes, 2 lines download raw bytes

1import{j as e,r as h}from"./vendor-react-nIFFWcjg.js";import{L as u}from"./vendor-react-router-65IGR4DC.js";import{I as x,a5 as p,n as j,h as _,i as d,j as C,A as f,S as g}from"./main-CUbWTmvN.js";import{u as k}from"./useCopyToClipboard-DmrZzmDg.js";import{u as y}from"./vendor-react-query-ChuYpeSs.js";const L=1800,N=()=>e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[e.jsx("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2.5",stroke:"currentColor",strokeWidth:"1.7"}),e.jsx("path",{d:"M4.5 7.5l7.5 5.5 7.5-5.5",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})]}),E=()=>e.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M4 12.5l5.5 5.5L20 6.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function I({email:t}){const{copied:s,copy:i}=k(L);return e.jsxs("button",{type:"button",className:"contacts-list__item-email text-3xs",onClick:()=>i(t),"aria-label":s?"Email copied":`Copy email address ${t}`,title:s?"Copied!":"Click to copy email",children:[e.jsx("span",{className:"contacts-list__item-email-icon",children:s?e.jsx(E,{}):e.jsx(N,{})}),e.jsx("span",{className:"contacts-list__item-email-text",children:s?"Copied!":t})]})}function b({contact:t}){var s;return e.jsxs("article",{className:"contacts-list__item",children:[e.jsx("div",{className:"contacts-list__item-image-container",children:e.jsx(x,{className:"contacts-list__item-image",variant:j.SquareLogoM,src:(s=t.image)!=null&&s.length?t.image:p,alt:`${t.name}-image`,width:120,height:120})}),e.jsxs("div",{className:"contacts-list__item-id",children:[e.jsx("span",{className:"contacts-list__item-job-title text-3xs",children:t.jobTitle}),e.jsx("h4",{className:"contacts-list__item-name",children:t.name})]}),t.email&&e.jsx(I,{email:t.email}),t.phone&&e.jsx(u,{className:"contacts-list__item-phone small-text",to:`tel:${t.phone}`,children:t.phone})]})}const v=30*60*1e3,w=()=>{const{apiUrl:t}=_();return y({queryKey:["contacts",t],queryFn:()=>M(t),staleTime:d()?void 0:v,enabled:!!t})},M=async t=>{const s=d(),{data:i}=await C.get(`${t}${f.endpoints.contacts}`,{headers:s?{Authorization:`Bearer ${s}`}:{}});return i};function B(t){const{data:s,isLoading:i}=w(),o=h.useMemo(()=>{if(!s)return[];const a=[];let n=s;
1return t.contacts.forEach(({value:c,isSelected:m})=>{const l=n.find(r=>r.id===c);n=n.filter(r=>r.id!==c),l&&m&&a.push(l)}),[...a,...n]},[s,t.contacts]);return i?e.jsx("div",{style:{display:"block",width:"100%",height:"100vh"},children:e.jsx(g,{count:30})}):!o||o.length===0?null:e.jsx("ul",{className:"contacts-list",children:o.map(a=>e.jsx("li",{className:"contacts-list__cell",children:e.jsx(b,{contact:a})},a.id))})}export{B as default};
2//# sourceMappingURL=ContactsList-CBlRxBOz.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.