'use client'; import { motion } from 'motion/react'; import { Logo } from '@/components/logo'; import GithubIcon from '@workspace/ui/components/icons/github-icon'; import XIcon from '@workspace/ui/components/icons/x-icon'; import { useIsMobile } from '@workspace/ui/hooks/use-mobile'; import { useEffect, useState } from 'react'; import { ThemeSwitcher } from './theme-switcher'; const LOGO_WRAPPER_VARIANTS = { center: { top: 0, left: 0, right: 0, bottom: 0, height: '100%', }, topLeft: { top: 0, left: 0, right: 0, bottom: 'auto', height: 'auto', }, }; const logoVariants = (isScroll: boolean, isMobile: boolean) => ({ center: { top: '50%', left: '50%', x: '-50%', y: '-50%', scale: 1, }, topLeft: { top: isScroll ? (isMobile ? 4 : 0) : 20, left: isScroll ? (isMobile ? -36 : -61) : isMobile ? -36 : -43, x: 0, y: 0, scale: isScroll ? (isMobile ? 0.6 : 0.5) : 0.6, }, }); export const Header = ({ transition }: { transition: boolean }) => { const isMobile = useIsMobile(); const [isScroll, setIsScroll] = useState(false); useEffect(() => { const handleScroll = () => setIsScroll(window.scrollY > 10); window.addEventListener('scroll', handleScroll); return () => window.removeEventListener('scroll', handleScroll); }, []); return (
); };