2 lines
952 B
JavaScript
2 lines
952 B
JavaScript
import{j as s,e as r,a5 as i,b as x,a6 as o}from"./ui-library-DpZprY9x.js";import{L as j}from"./react-vendor-Y0eyvj1J.js";const d=({className:a,featured_images:e,title:t,id:c,published_at:n})=>{var l;return s.jsx(j,{to:`/news/${c}`,children:s.jsxs("article",{className:r("bg-surface_container justify-between h-[400px] flex flex-col gap-6",a),children:[s.jsxs("div",{className:"flex flex-col gap-4 px-6 pt-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h4",{children:n.slice(0,10).split("-").reverse().join(".")}),s.jsx(i,{})]}),s.jsx("hr",{}),s.jsx("h3",{className:"text-[20px] leading-[130%] line-clamp-3",children:t})]}),s.jsx("img",{src:((l=e==null?void 0:e[0])==null?void 0:l.path)||"",alt:"news image",className:"w-full h-[220px] object-cover"})]})})},m=a=>{const{data:e,isPending:t}=x({queryKey:["news",a],queryFn:()=>o(a),select:({data:c})=>c.data});return{data:e,isPending:t}};export{d as N,m as u};
|