2 lines
953 B
JavaScript
2 lines
953 B
JavaScript
import{a2 as r,a4 as i,j as s,c as x,a5 as o}from"./ui-library-hk2QbOT6.js";import{L as j}from"./react-vendor-Y0eyvj1J.js";const d=a=>{const{data:e,isPending:c}=r({queryKey:["news",a],queryFn:()=>i(a),select:({data:t})=>t.data});return{data:e,isPending:c}},m=({className:a,featured_images:e,title:c,id:t,published_at:n})=>{var l;return s.jsx(j,{to:`/news/${t}`,children:s.jsxs("article",{className:x("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(o,{})]}),s.jsx("hr",{}),s.jsx("h3",{className:"text-[20px] leading-[130%] line-clamp-3",children:c})]}),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"})]})})};export{m as N,d as u};
|