'use client'; import { useIsDarkMode } from '@/lib/dark-mode'; import { cn } from '@/lib/utils'; import { AnimatePresence, motion } from 'framer-motion'; import { useEffect, useState } from 'react'; import { Button } from './ui/button'; type Frame = { id: string; label: string; key: string; Component: React.ComponentType; }; function LivePreview() { const isDark = useIsDarkMode(); const colorScheme = isDark ? 'dark' : 'light'; const [loaded, setLoaded] = useState(false); useEffect(() => { setLoaded(true); }, []); if (!loaded) { return null; } return (