'use client' import BrowserFrame from '~/components/BrowserFrame' import { AnimatePresence, motion, useInView } from 'motion/react' import { useTheme } from 'next-themes' import React, { useRef, useState } from 'react' import { cn } from 'ui' import SectionContainer from '@/components/Layouts/SectionContainer' export function DashboardFeaturesSection({ title, tabs, }: { title: React.ReactNode tabs: { label: string panel: React.FC<{ isDark: boolean }> highlights: { label: string; link?: string }[] }[] }) { const { resolvedTheme } = useTheme() const [activeTabIdx, setActiveTabIdx] = useState(0) const sectionRef = useRef(null) const isInView = useInView(sectionRef, { once: true }) if (tabs.length === 0) return null const Panel = tabs[activeTabIdx].panel return (

{title}

{tabs.map((tab, index) => ( ))}
{isInView && ( )}
) }