diff --git a/components/pages/login.tsx b/components/pages/login.tsx index 924f9bf..5b5ca8a 100644 --- a/components/pages/login.tsx +++ b/components/pages/login.tsx @@ -9,7 +9,6 @@ import { signInWithGoogle, loginUser } from "@/lib/auth"; import { GradientText } from "@/components/ui/gradient-text"; import { GoogleLoginButton } from "@/components/ui/google-login-button"; import { Eye, EyeOff } from "lucide-react"; -import { isGoogleLoginEnabled } from "@/lib/server-config"; import Footer from "@/components/common/Footer"; import { useDeviceType } from "@/hooks/useDeviceType"; @@ -24,7 +23,6 @@ export default function Login() { const [googleLoading, setGoogleLoading] = useState(false); const [emailFocused, setEmailFocused] = useState(false); const [passwordFocused, setPasswordFocused] = useState(false); - const [showGoogleLogin, setShowGoogleLogin] = useState(false); const router = useRouter(); const searchParams = useSearchParams(); const { isMobile } = useDeviceType(); @@ -82,21 +80,6 @@ export default function Login() { } } - // 检查是否启用Google登录 - const checkGoogleLoginStatus = async () => { - try { - console.log('🔍 登录页面:开始检查Google登录状态...'); - const enabled = await isGoogleLoginEnabled(); - console.log('📋 登录页面:Google登录启用状态:', enabled); - setShowGoogleLogin(enabled); - console.log('📋 登录页面:设置showGoogleLogin状态为:', enabled); - } catch (error) { - console.error("❌ 登录页面:Failed to check Google login status:", error); - setShowGoogleLogin(false); - } - }; - - checkGoogleLoginStatus(); }, [searchParams]); const handleGoogleSignIn = async () => { @@ -283,31 +266,27 @@ export default function Login() { {isSubmitting ? "Logging in..." : "Login"} - {/* Google登录按钮 - 根据服务端配置显示/隐藏 */} - {showGoogleLogin && ( - <> -
- Don't have an account?{" "} + Don't have an account?{" "} Sign up