feat(site): new home page, docs, and design system (#566)

Co-authored-by: Darius Cepulis <dcepulis@mux.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ronald Urbina
2026-03-06 16:19:27 -06:00
committed by GitHub
co-authored by Darius Cepulis Claude Opus 4.6
parent f2f9e6ddc3
commit 351a3e8bda
255 changed files with 3574 additions and 1532 deletions
+27
View File
@@ -0,0 +1,27 @@
import { useEffect, useRef, useState } from 'react';
export function useIntersection(options?: IntersectionObserverInit): [React.RefCallback<Element>, boolean] {
const [isIntersecting, setIsIntersecting] = useState(false);
const observerRef = useRef<IntersectionObserver | null>(null);
useEffect(() => {
return () => observerRef.current?.disconnect();
}, []);
const ref = (node: Element | null) => {
observerRef.current?.disconnect();
if (!node || isIntersecting) return;
observerRef.current = new IntersectionObserver(([entry]) => {
if (entry?.isIntersecting) {
setIsIntersecting(true);
observerRef.current?.disconnect();
}
}, options);
observerRef.current.observe(node);
};
return [ref, isIntersecting];
}