PageSourceSearch

https://www.hss.edu/scripts/mockApi-dfdbdaea.js

js hss.edu collected 2026-09-24 08:42:59 UTC 2,714 bytes, 2 lines download raw bytes

1import{r as e}from"./vendor-d5e8df3a.js";const f=({endpoint:c,heading:n,description:s})=>{const[a,i]=e.useState([]),[o,m]=e.useState(!1),[r,p]=e.useState(null),E=e.useCallback(async()=>{if(!c)return;m(!0);const t=await fetch(`${c}`);if(t.status===200){const l=await t.json();if(!Array.isArray(l))throw new Error("Data is not an array");i(l),m(!1)}else p(`Something went wrong with the request. Status: ${t.status}`),m(!1)},[c]);return e.useEffect(()=>{E()},[]),o?e.createElement("div",{className:"mock-api__loader align-items-center justify-content-center row"},e.createElement("div",{className:"mock-api__loader-symbol"})):e.createElement(e.Fragment,null,e.createElement("h2",{className:"mock-api__heading"},n),e.createElement("p",{className:"mock-api__description"},s),r&&e.createElement("p",null,r),!r&&(!a||(a==null?void 0:a.length)===0)&&e.createElement("p",null,"No results found"),a&&a.length>0&&e.createElement("ul",{className:"justify-content-center row row--vertical-gap"},a.map((t,l)=>e.createElement("li",{key:l,className:"col-lg-3 col-md-4 col-sm-6"},e.createElement("div",{className:`mock-api__card-item ${t.image?"mock-api__card-item--w-image":""}`},t.image?e.createElement("img",{className:"mock-api__card-item-image",src:t.image,alt:t.title}):e.createElement("div",{className:"mock-api__card-pattern"},e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 329 242",fill:"none"},e.createElement("path",{fill:"#6A2FF3",d:"M127.576 8 .286 81.43l.284.491H0v71.586l63.182-36.473 63.841 37.132.29.17 62.498-37.025-62.235-36.316V8Zm-62.41 37.325L126.43 9.984v69.265h-.021v1.144L65.166 45.325Zm-1.417 70.712V46.144l.269-.156 62.391 35.725v70.772l-62.66-36.448ZM1.146 82.257l61.456-35.453v69.241L1.146 151.523V82.257Zm126.409.053 59.995 35.008-59.995 35.543V82.31Z"}),e.createElement("path",{fill:"#6A2FF3",d:"m63.146 204.25 62.037 35.82 62.037-35.82v-69.265l-61.75 35.647-.287.166-62.037-35.813v69.265ZM188.366 133v71.911l-62.896 36.318-.287.165-62.896-36.317-.287-.166V133l63.183 36.475L188.366 133Z"}),e.createElement("path",{fill:"#FFB800",d:"m202.963 108.031 63.633 37.108 62.378-35.761-63.225-37.53-.585.986 61.537 36.527-60.1 34.455-62.492-36.443.047-70.274h-1.145l-.048 70.932Z"}),e.createElement("path",{fill:"#6A2FF3",d:"M203.183 36.475 140 0v71.912l62.897 36.317.286.166 62.897-36.317.286-.166V0l-63.183 36.475Zm62.037-34.49V71.25l-62.037 35.82-62.037-35.82V1.985l61.751 35.647.286.166L265.22 1.985Z"}))),e.createElement("h3",{className:"mock-api__card-item-title"},t.title),(t.author||t.occupation)&&e.createElement("p",{className:"mock-api__card-item-info"},t.author," ",t.author?"|":"",t.occupation))))))};export{f as default};
2//# sourceMappingURL=mockApi-dfdbdaea.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.