import React, { useRef, useLayoutEffect } from 'react'; import { motion } from 'framer-motion'; import gsap from 'gsap'; import { ScrollTrigger } from 'gsap/ScrollTrigger'; gsap.registerPlugin(ScrollTrigger); const posts = [ { image: 'https://lh3.googleusercontent.com/aida-public/AB6AXuARalmRkuoZMBAbavGQgx4a-JhLgXBJ6JSD0U4vycdwaGGV3d-ffUFrdbx2lIbKrYCmS100i7VJ0w5cDHITXYV6w1-pSUPHKL7Jik__TWOIYOnq_4ND5ri7l8SQoaJdjJK9jhYvtxdxrZm6j8t8BNAjvPTaUdUDo4C7QVqcx1KbGvup6cpF8vY1LJ82S_5OMAZ6JgH0rK5bvWpqD3WqPhtqJCUB6d_1gUvluKjotwnNQ03t1dSYV8HOtRrLE83j6i_wgL4GZ0XTsMZb', date: 'Oct 12, 2024', category: 'Cybersecurity', title: 'The Hidden Risks of Remote Work', excerpt: 'As remote work becomes permanent, new vulnerabilities emerge. Learn how to secure your distributed workforce effectively.' }, { image: 'https://lh3.googleusercontent.com/aida-public/AB6AXuCz5lTYjY4RNXubQlrA-BtLIGR3nUY8ULkD9omwT5FShfdMrbMgS5dDCyfN3xiB5WC7T3vjNvyvVbvnD0G1zBpbNTjfOYyhmAEfno7Hf5W1sm-KYRXYrLGQq-c6TkLgEf0i9JGNvuFZ6edcenr2o39dCzIPXcp_z9XWOIzp7kBX2EydNPLJoRofVYuSTmEA1y0_xh4sdiRy1PykRASGLhKfN19_XLNuwyTBVKYISY7cHc-An69eZpAfhrvngu3E47rU6KuQS0k3QXBZ', date: 'Sep 28, 2024', category: 'Cloud Infrastructure', title: 'Migrating to the Cloud: A Step-by-Step Guide', excerpt: 'Thinking about moving your data? Here is a comprehensive checklist to ensure a smooth and secure transition.' }, { image: 'https://lh3.googleusercontent.com/aida-public/AB6AXuCl5iOhTsCqcHnho89DkoLh0DYeuvef0pdp8k26NKzcAq7YPvWbAYARg9mCIvqGTxQGradp8zvscuuibskpz4W_nEzQQO1z7lgwKJ1Xxiw_yQOyXMLfoRNLTHXzqFUH8Q5daCAfYTb7Zl3sFjB7k8i44D6TGolzqrN05Db27Abf2TWDDzHpVSrNml4zddvxholHFxMzqDeSzQ5p77SLDSFNaYBZGR2lEdN2V9O0GzMqxbOjFmBGMW48nlrEDLDzYGv_gWI3RSqNqBl-', date: 'Sep 15, 2024', category: 'Innovation', title: 'AI in Business: Beyond the Hype', excerpt: 'Artificial Intelligence is transforming industries. Discover practical applications that can drive efficiency in your business today.' } ]; const Blog: React.FC = () => { const containerRef = useRef(null); const imagesRef = useRef<(HTMLDivElement | null)[]>([]); imagesRef.current = []; useLayoutEffect(() => { const ctx = gsap.context(() => { imagesRef.current.forEach((imgWrapper) => { if (!imgWrapper) return; gsap.to(imgWrapper, { yPercent: 30, ease: "none", scrollTrigger: { trigger: imgWrapper.closest('article'), start: "top bottom", end: "bottom top", scrub: true } }); }); }, containerRef); return () => ctx.revert(); }, []); return (
Latest Insights

Knowledge base.

View all posts arrow_forward
{posts.map((post, i) => (
{ if(el) imagesRef.current.push(el); }} className="w-full h-[140%] -mt-[20%]" > {post.title}
Read
{post.date} {post.category}

{post.title}

{post.excerpt}

))}
); }; export default Blog;