"use client"; import { ArrowLeft } from "lucide-react"; import Link from "next/link"; import React, { useEffect, useMemo, useRef, useState } from "react"; import { usePathname } from "next/navigation"; type Props = { project: { url?: string; title: string; description: string; repository?: string; }; }; export const Navigation: React.FC = ({ project }) => { const pathname = usePathname(); const ref = useRef(null); const [isIntersecting, setIntersecting] = useState(true); useEffect(() => { if (!ref.current) return; const observer = new IntersectionObserver(([entry]) => setIntersecting(entry.isIntersecting), ); observer.observe(ref.current); return () => observer.disconnect(); }, []); return (
GitHub

{project.title}

{project.url ? ( Website ) : null} {project.repository ? ( Repository ) : null}
); };