"use client"; import { IconBrandLinkedin, IconBrandTiktok, IconBrandX, IconBrandYoutube, } from "@tabler/icons-react"; import { Component, type ReactNode, useEffect, useRef, useState } from "react"; import { LinkedInEmbed, TikTokEmbed, XEmbed, YouTubeEmbed } from "react-social-media-embed"; import { Reveal } from "@/components/connectors-marketing/reveal"; type Post = | { kind: "youtube"; url: string; title: string; channel: string } | { kind: "x"; url: string } | { kind: "linkedin"; url: string; postUrl: string } | { kind: "tiktok"; url: string }; /** * Organic SurfSense coverage — real posts embedded live with react-social-media-embed, * grouped into three platform-uniform marquee rows (heights match within a row). * * Note: LinkedIn only renders when the author enabled embedding on the post; if * disabled, the EmbedBoundary swaps in a link card to the original. * * ponytail: three rows, each list duplicated once for a seamless CSS loop. Ceiling: * heavy third-party embeds. Mitigated by lazy-mounting the whole section on scroll * (IntersectionObserver). Upgrade path: per-card virtualization, or swap YouTube * players for thumbnail links. */ const YOUTUBE: Post[] = [ { kind: "youtube", url: "https://www.youtube.com/watch?v=i9AJ7PHGSGg", title: "SurfSense vs NotebookLM", channel: "rezasaad plus", }, { kind: "youtube", url: "https://www.youtube.com/watch?v=VBOwuD6xVK0", title: "NotebookLM Is Great… Until You See SurfSense", channel: "Thomas AI", }, { kind: "youtube", url: "https://www.youtube.com/watch?v=UaekqjhUiJM", title: "NotebookLM vs SurfSense en 6 pruebas reales (sorprendente)", channel: "NextGen IA Hub", }, { kind: "youtube", url: "https://www.youtube.com/watch?v=QGjKpZJJ9aw", title: "Gana DINERO configurando “Cerebros de IA” privados con SurfSense", channel: "Creando Con La IA", }, { kind: "youtube", url: "https://www.youtube.com/watch?v=cfNAIQtNbKY", title: "¿Adiós NotebookLM? Probé SurfSense y es BRUTAL (IA Gratis)", channel: "NextGen IA Hub", }, { kind: "youtube", url: "https://www.youtube.com/watch?v=pIWOKSHhf38", title: "¿Superaron a NotebookLM? SurfSense es Open Source, privada y GRATIS", channel: "academIArtificial", }, { kind: "youtube", url: "https://www.youtube.com/watch?v=K5xx-J_mQZ8", title: "¿Mejor que NotebookLM? IA GRATIS con modo local", channel: "Migue Baena IA", }, { kind: "youtube", url: "https://www.youtube.com/watch?v=AKxM3RUBFsc", title: "¿Nueva IA GRATIS destroza a NotebookLM de Google? (OPEN SOURCE)", channel: "Inteligencia Artificial Top", }, { kind: "youtube", url: "https://www.youtube.com/watch?v=jCAgeaVgPDA", title: "¿Nueva Herramienta IA GRATIS Destroza a NotebookLM? (OPEN SOURCE)", channel: "Joaquín Barberá", }, ]; const TWEETS: Post[] = [ { kind: "x", url: "https://x.com/LangChain/status/1853133037019562434" }, { kind: "x", url: "https://x.com/MoureDev/status/1976279289780740448" }, { kind: "x", url: "https://x.com/GithubProjects/status/2004892541590929490" }, { kind: "x", url: "https://x.com/GitHub_Daily/status/1920418408736436438" }, { kind: "x", url: "https://x.com/tom_doerr/status/2066062170173977088" }, { kind: "x", url: "https://x.com/itsharmanjot/status/2066118517905354816" }, { kind: "x", url: "https://x.com/JulianGoldieSEO/status/2011085275133604095" }, { kind: "x", url: "https://x.com/L_go_mrk/status/2066482853232115847" }, { kind: "x", url: "https://x.com/semihdev/status/2006275500952736028" }, { kind: "x", url: "https://x.com/shao__meng/status/1919912860957999494" }, { kind: "x", url: "https://x.com/LangChain/status/1840406184316342561" }, ]; const SOCIAL: Post[] = [ { kind: "linkedin", url: "https://www.linkedin.com/embed/feed/update/urn:li:ugcPost:7448203908834938881", postUrl: "https://www.linkedin.com/posts/vikas-singh-546643206_most-ai-tools-live-in-your-browser-and-ugcPost-7448203908834938881-gR6y", }, { kind: "linkedin", url: "https://www.linkedin.com/embed/feed/update/urn:li:share:7448351685409701889", postUrl: "https://www.linkedin.com/posts/neha-jain-279b80118_ive-been-using-a-lot-of-ai-tools-daily-share-7448351685409701889-JvFP", }, { kind: "tiktok", url: "https://www.tiktok.com/@alejavirivera/video/7603064928114625814", }, ]; const CARD = "mr-4 shrink-0 overflow-hidden rounded-xl border bg-card"; const SIZE: Record = { youtube: "h-[262px] w-[340px]", x: "h-[440px] w-[340px]", linkedin: "h-[540px] w-[340px]", tiktok: "h-[540px] w-[340px]", }; const META: Record = { youtube: { Icon: IconBrandYoutube, label: "YouTube" }, x: { Icon: IconBrandX, label: "X" }, linkedin: { Icon: IconBrandLinkedin, label: "LinkedIn" }, tiktok: { Icon: IconBrandTiktok, label: "TikTok" }, }; /** * Some embeds (notably Facebook, and LinkedIn when the author disabled embedding) * throw at render/mount instead of degrading gracefully. This boundary stops one * bad embed from taking down the whole marquee — it swaps in a link card instead. */ class EmbedBoundary extends Component< { fallback: ReactNode; children: ReactNode }, { failed: boolean } > { state = { failed: false }; static getDerivedStateFromError() { return { failed: true }; } render() { return this.state.failed ? this.props.fallback : this.props.children; } } function FallbackCard({ post }: { post: Post }) { const { Icon, label } = META[post.kind]; const href = post.kind === "linkedin" ? post.postUrl : post.url; return (
View this post on {label}
); } function Card({ post }: { post: Post }) { switch (post.kind) { case "youtube": return (
{post.channel}
{post.title}
); case "x": return (
); case "linkedin": return (
); case "tiktok": return (
); } } function Row({ posts, animation, duration, }: { posts: Post[]; animation: "ss-marquee-l" | "ss-marquee-r"; duration: number; }) { return (
{/* Track holds the list twice; the -50% shift wraps seamlessly (margins, not gap). */}
{[...posts, ...posts].map((post, i) => ( } > ))}
); } export function SocialProof() { // Third-party embeds are heavy; only mount them once the section scrolls near view. const ref = useRef(null); const [visible, setVisible] = useState(false); useEffect(() => { const el = ref.current; if (!el) return; const io = new IntersectionObserver( (entries) => { if (entries[0]?.isIntersecting) { setVisible(true); io.disconnect(); } }, { rootMargin: "300px" } ); io.observe(el); return () => io.disconnect(); }, []); return (

Loved across the internet

{visible ? ( <> {/* Only 3 social cards — pre-double so one set spans wide viewports (no loop gap). */} ) : null}
); }