'use client'; import "./style.scss"; import Image from 'next/image'; import Link from 'next/link'; import { useRouter, usePathname } from 'next/navigation'; import { useEffect } from 'react'; import { GoogleOAuthProvider } from '@react-oauth/google'; import useAuth from '@/hooks/useAuth'; import { useConfigContext } from '@/contexts/configProvider'; export default function Layout({ children }: { children: React.ReactNode }) { const router = useRouter(); const pathname = usePathname(); const { isAuthenticated, isLoading } = useAuth(); const config = useConfigContext(); // 이미 로그인된 상태면 홈으로 리다이렉트 (Google 로그인 완료 페이지 제외) useEffect(() => { if (!isLoading && isAuthenticated && !pathname.startsWith('/login/google/complete')) { router.replace('/'); } }, [isAuthenticated, isLoading, router, pathname]); return (
bitforum {children}

© 2025 PLAYR. All rights reserved.
); }