PageSourceSearch

https://legateca.com/assets/blogs--TeOBwV_.js

js legateca.com collected 2026-10-06 13:42:51 UTC 12,438 bytes, 1 lines download raw bytes

1import{Z as $,r as i,R as f,b as e,$ as D,c as T}from"./vendor-CNlRBQKV.js";import{F as A}from"./index-BLUlY5na.js";import{convertDateFormat as u}from"./blogsArticle-DL1R97jh.js";import{HeroSection as E}from"./About-BUtDk5S4.js";import"./vendor-lodash-B3EhnKIF.js";/* empty css                       */import"./ImageWithText-DTIdaL76.js";const w="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20%3e%3cpath%20d='M13%207H11V17H13V7Z'%20fill='%23006765'%20/%3e%3cpath%20d='M5.99996%207.75732L7.41418%209.17154L5.58572%2011L9.99996%2011V13L5.58579%2013L7.41418%2014.8284L5.99996%2016.2426L1.75732%2012L5.99996%207.75732Z'%20fill='%23006765'%20/%3e%3cpath%20d='M18%2016.2427L16.5858%2014.8285L18.4143%2013H14V11L18.4142%2011L16.5858%209.17161L18%207.75739L22.2427%2012L18%2016.2427Z'%20fill='%23006765'%20/%3e%3c/svg%3e",Q=F=>{console.log("Blogs loaded");const j=$(),[r,C]=i.useState(1),[d,v]=i.useState(1),[N,b]=i.useState([]),o=9,[y,R]=f.useState(0),[n,x]=f.useState([]),[m,p]=i.useState(!1),[h,g]=i.useState(!0);i.useEffect(()=>{H(r)},[r]);const H=async s=>{p(!0);try{const t=(s-1)*o,l=await fetch(`https://api.legateca.com/blogs?$limit=${o}&$skip=${t}&%24sort%5BcreatedAt%5D=-1`);if(l.ok){const a=await l.json();b(c=>[...c,...a.data]),x(c=>[...c,...a.data]),v(Math.ceil(a.total/o))}else console.error("Error fetching data:",l.status)}catch(t){console.error("Error fetching data:",t)}finally{p(!1)}},V=()=>{r<d&&C(s=>s+1)},[L,S]=i.useState(0);async function M(s){var t;try{console.log({val:s});const l=await T.get("https://api.legateca.com/blogs",{params:{$limit:`${o}`,$skip:`${y}`,...s==="All"?null:{category:`${s}`}}});x((t=l==null?void 0:l.data)==null?void 0:t.data)}catch(l){console.log({error:l})}}function k(s){let t=[...N];if(!s.target.value||s.target.value===""){x([...t]);return}let l=t.filter(a=>a.title.toLowerCase().includes(s.target.value.toLowerCase()));x([...l])}function B(s,t){let l;return function(...a){const c=()=>{l=null,s(...a)};clearTimeout(l),l=setTimeout(c,t)}}const Z=B(s=>k(s),600);return e.jsxs(e.Fragment,{children:[e.jsxs(D,{children:[e.jsx("link",{rel:"canonical",href:"https://legateca.com/blogs"}),e.jsx("meta",{name:"robots",content:"INDEX,FOLLOW"}),e.jsx("meta",{name:"description",content:"Legateca is a leading legal advice firm, offering a full range of legal services to clients. We specialize in corporate and commercial law, and dispute resolution."})]}),e.jsx(E,{heading:"Articles",bgImg:"https://legateca-public-files-prod.s3.eu-west-2.amazonaws.com/articles.webp"}),e.jsx("main",{children:e.jsx("div",{className:"xl:py-[100px] py-[70px] w-full mx-auto xl:px-0 md:px-8 px-6 xl:max-w-[1240px] 3xl:max-w-[2400px]",children:e.jsx("section",{children:e.jsxs("div",{className:"w-full xl:flex-row flex-col-reverse gap-[50px] flex xl:justify-between",children:[e.jsxs("div",{className:"flex flex-col gap-10 items-start w-full",children:[n.length?n.map((s,t)=>e.jsxs("div",{onClick:()=>{j.push(`/articles/${s.slug}`)},className:"flex cursor-pointer flex-col gap-[35px] items-start w-full h-full",children:[e.jsx("img",{src:s==null?void 0:s.logoimage,alt:"ss",className:"w-full object-cover"}),e.jsxs("div",{className:"flex flex-col w-full items-start gap-4",children:[e.jsx("div",{className:"text-[#252525] text-[22px] not-italic font-semibold leading-[normal] tracking-[0.44px] capitalize",children:s.title||"N/A"}),e.jsx("div",{dangerouslySetInnerHTML:{__html:s.description},className:"text-[#252525] customsss text-sm not-italic font-normal webkit-custom leading-[142.014%] tracking-[0.28px]"}),e.jsxs("div",{className:"flex items-center w-full justify-between",children:[e.jsxs("div",{className:"flex xl:flex-row flex-col gap-3 xl:gap-[22px] xl:items-center",children:[e.jsxs("div",{className:"flex gap-2 items-center text-[#00000057] ",children:[e.jsx("svg",{width:13,height:15,viewBox:"0 0 13 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M7.65039 8.36914C10.3027 8.36914 12.4629 10.5293 12.4629 13.1816C12.4629 13.6738 12.0527 14.0566 11.5879 14.0566H1.08789C0.595703 14.0566 0.212891 13.6738 0.212891 13.1816C0.212891 10.5293 2.3457 8.36914 5.02539 8.36914H7.65039ZM1.52539 12.7441H11.123C10.9043 11.0215 9.42773 9.68164 7.65039 9.68164H5.02539C3.2207 9.68164 1.74414 11.0215 1.52539 12.7441ZM6.33789 7.05664C4.39648 7.
105664 2.83789 5.49805 2.83789 3.55664C2.83789 1.64258 4.39648 0.0566406 6.33789 0.0566406C8.25195 0.0566406 9.83789 1.64258 9.83789 3.55664C9.83789 5.49805 8.25195 7.05664 6.33789 7.05664ZM6.33789 1.36914C5.10742 1.36914 4.15039 2.35352 4.15039 3.55664C4.15039 4.78711 5.10742 5.74414 6.33789 5.74414C7.54102 5.74414 8.52539 4.78711 8.52539 3.55664C8.52539 2.35352 7.54102 1.36914 6.33789 1.36914Z",fill:"currentColor"})}),e.jsxs("span",{className:"text-inherit text-sm not-italic font-medium leading-[normal] tracking-[0.28px] uppercase",children:[" ",s.author?s==null?void 0:s.author:"N/A"]})]}),e.jsxs("div",{className:"flex gap-2 items-center text-[#00000057] ",children:[e.jsx("svg",{width:13,height:15,viewBox:"0 0 13 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M6.40039 7.05664C6.61914 7.05664 6.83789 7.27539 6.83789 7.49414V10.1191C6.83789 10.3652 6.61914 10.5566 6.40039 10.5566H3.77539C3.5293 10.5566 3.33789 10.3652 3.33789 10.1191V7.49414C3.33789 7.27539 3.5293 7.05664 3.77539 7.05664H6.40039ZM4.21289 0.0566406C4.56836 0.0566406 4.86914 0.357422 4.86914 0.712891V1.80664H8.80664V0.712891C8.80664 0.357422 9.08008 0.0566406 9.46289 0.0566406C9.81836 0.0566406 10.1191 0.357422 10.1191 0.712891V1.80664H11.2129C12.1699 1.80664 12.9629 2.59961 12.9629 3.55664V12.3066C12.9629 13.291 12.1699 14.0566 11.2129 14.0566H2.46289C1.47852 14.0566 0.712891 13.291 0.712891 12.3066V3.55664C0.712891 2.59961 1.47852 1.80664 2.46289 1.80664H3.55664V0.712891C3.55664 0.357422 3.83008 0.0566406 4.21289 0.0566406ZM11.6504 5.30664H2.02539V12.3066C2.02539 12.5527 2.2168 12.7441 2.46289 12.7441H11.2129C11.4316 12.7441 11.6504 12.5527 11.6504 12.3066V5.30664Z",fill:"currentColor"})}),e.jsx("span",{className:"text-inherit text-sm not-italic font-medium leading-[normal] tracking-[0.28px] uppercase",children:u(s.createdAt)})]})]}),e.jsxs("div",{className:"text-[#006766] whitespace-nowrap text-xs not-italic font-semibold leading-[45px] tracking-[0.24px] uppercase",children:[e.jsx("span",{children:"READ MORE"}),e.jsx("svg",{className:"inline ml-2",width:13,height:2,viewBox:"0 0 13 2",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M12.2129 0.806641C12.2129 1.13477 11.9551 1.36914 11.6504 1.36914H0.775391C0.447266 1.36914 0.212891 1.13477 0.212891 0.806641C0.212891 0.501953 0.447266 0.244141 0.775391 0.244141H11.6504C11.9551 0.244141 12.2129 0.501953 12.2129 0.806641Z",fill:"#006766"})})]})]})]})]},t)):e.jsx("div",{className:"xl:min-w-[700px] flex justify-center text-[20px] font-[500] flex-col h-full items-center",children:"No Results To Show"}),r<d&&e.jsx("div",{className:"w-full flex flex-col justify-center items-center mt-4",children:e.jsx("button",{className:"bg-ThemeSecondary hover:bg-ThemeSecondary/80 border-none text-white p-2 w-1/2 text-center md:w-1/5",onClick:V,disabled:m,children:m?e.jsxs("div",{className:"flex justify-center items-center p-2 gap-1",children:[e.jsx("span",{className:"dot w-2 h-2 bg-white rounded-full animate-bounce"}),e.jsx("span",{className:"dot w-2 h-2 bg-white rounded-full animate-bounce delay-200"}),e.jsx("span",{className:"dot w-2 h-2 bg-white rounded-full animate-bounce delay-400"})]}):"View More"})})]}),!h&&e.jsx("div",{onClick:()=>g(!0),children:e.jsx("img",{className:"w-6 h-6 cursor-pointer",src:w,alt:"view"})}),h&&e.jsxs("div",{className:"w-full h-full xl:max-w-[358px] flex flex-col gap-[30px]",children:[e.jsxs("div",{onClick:()=>g(!1),className:"flex justify-end items-center gap-2 cursor-pointer",children:[e.jsx("img",{className:"w-6 h-6",src:w,alt:"image"}),e.jsx("span",{className:"text-ThemeSecondary!",children:"Hide Quick Access"})]}),e.jsxs("div",{className:"border flex items-center border-[#D9D9D9] rounded-[10px] pl-4",children:[e.jsx("input",{onChange:s=>{Z(s)},className:"bg-white !border-none outline-none focus:!border-none",placeholder:"Search"}),e.jsx("div",{className:"px-[14px] py-3 border-[#D9D9D9] border-l flex justify-content-center items-center",children:e.jsx("svg",{width:13,height:13,viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M12.4648 11.1904C12.6992 11.4248 12.6992 11.7764 12.4648 11.9873C12.3711 12.1045 12.2305 12.1514 12.0898 12.1514C11.9258 12.1514 11.7852 12.1045 11.668 11.9873L8.52734 8.84668C7.68359 9.52637 6.62891 9.90137 5.50391 9.90137C2.83203 9.90137 0.652344 7.72168 0.652344 5.02637C0.652344 2.35449 2.80859 0.151367 5.50391 0.151367C8.17578 0.151367 10.3789 2.35449 10.3789 5.02637C10.3789 6.1748 10.0039 7.22949 9.32422 8.0498L12.4648 11.1904ZM1.77734 5.02637C1.77734 7.1123 3.44141 8.77637 5.52734 8.77637C7.58984 8.77637 9.27734 7.1123 9.27734 5.02637C9.27734 2.96387 7.58984 1.27637 5.52734 1.27637C3.44141 1.27637 1.77734 2.96387 1.77734 5.02637Z",fill:"#006766"})})})]}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"text-[22px] font-semibold text-ThemeSecondary uppercase",children:["categories"," "]}),e.jsx("div",{className:"cursor-pointer",children:["All","Business","Disputes","Employment","Family","Immigration","Property"].map((s,t)=>e.jsx("div",{onClick:()=>{M(s),S(t)},className:`py-[20px] !cursor-pointer ${L==t?"bg-ThemeSecondary text-base text-white font-[500] ":"border-b border-[#BBBBBB] text-base text-[#252525]"} pl-[10px] `,children:s},t))})]}),e.jsxs("div",{className:"hidden lg:flex flex-col gap-4",children:[e.jsxs("div",{className:"text-[22px] font-semibold text-ThemeSecondary uppercase",children:["recent articles"," "]}),e.jsx("div",{className:"hidden xl:flex xl:flex-col lg:grid lg:grid-cols-2 lg:grid-rows-2 gap-[30px]",children:n==null?void 0:n.slice(0,5).map((s,t)=>e.jsxs("div",{onClick:()=>window.location.replace(`/articles/${s.slug}`),className:"flex flex-col cursor-pointer gap-[10px]",children:[e.jsx("img",{src:s.logoimage,className:"w-full h-full",alt:"blogs"}),e.jsxs("div",{className:"w-full",children:[e.jsx("div",{children:s.title}),e.jsxs("div",{className:"flex w-full justify-between items-center my-1",children:[e.jsxs("div",{className:"flex w-full gap-2 items-center text-[#00000057]",children:[e.jsx("svg",{width:13,height:15,viewBox:"0 0 13 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M6.40039 7.05664C6.61914 7.
105664 6.83789 7.27539 6.83789 7.49414V10.1191C6.83789 10.3652 6.61914 10.5566 6.40039 10.5566H3.77539C3.5293 10.5566 3.33789 10.3652 3.33789 10.1191V7.49414C3.33789 7.27539 3.5293 7.05664 3.77539 7.05664H6.40039ZM4.21289 0.0566406C4.56836 0.0566406 4.86914 0.357422 4.86914 0.712891V1.80664H8.80664V0.712891C8.80664 0.357422 9.08008 0.0566406 9.46289 0.0566406C9.81836 0.0566406 10.1191 0.357422 10.1191 0.712891V1.80664H11.2129C12.1699 1.80664 12.9629 2.59961 12.9629 3.55664V12.3066C12.9629 13.291 12.1699 14.0566 11.2129 14.0566H2.46289C1.47852 14.0566 0.712891 13.291 0.712891 12.3066V3.55664C0.712891 2.59961 1.47852 1.80664 2.46289 1.80664H3.55664V0.712891C3.55664 0.357422 3.83008 0.0566406 4.21289 0.0566406ZM11.6504 5.30664H2.02539V12.3066C2.02539 12.5527 2.2168 12.7441 2.46289 12.7441H11.2129C11.4316 12.7441 11.6504 12.5527 11.6504 12.3066V5.30664Z",fill:"currentColor"})}),e.jsx("span",{className:"text-inherit text-sm not-italic font-medium tracking-[0.28px] uppercase",children:u(s.createdAt)})]}),e.jsx("div",{className:"w-full flex justify-end text-[#006766] text-xs not-italic font-semibold tracking-[0.24px] uppercase",children:e.jsxs("span",{children:["VIEW",e.jsx("svg",{className:"inline ml-2",width:13,height:2,viewBox:"0 0 13 2",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M12.2129 0.806641C12.2129 1.13477 11.9551 1.36914 11.6504 1.36914H0.775391C0.447266 1.36914 0.212891 1.13477 0.212891 0.806641C0.212891 0.501953 0.447266 0.244141 0.775391 0.244141H11.6504C11.9551 0.244141 12.2129 0.501953 12.2129 0.806641Z",fill:"#006766"})})]})})]})]})]},t))})]})]})]})})})}),e.jsx(A,{})]})};export{Q as default};

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.