框架优化
This commit is contained in:
@@ -7,7 +7,7 @@ import { supabaseService } from "@/hooks/supabaseService";
|
||||
|
||||
const Login = () => {
|
||||
const navigate = useNavigate();
|
||||
const { login, signInWithGoogle, loading } = useAuth();
|
||||
const { login, signInWithGoogle, emailLoading, googleLoading } = useAuth();
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const handleLogin = async (values) => {
|
||||
@@ -75,6 +75,8 @@ const Login = () => {
|
||||
type="primary"
|
||||
htmlType="submit"
|
||||
block
|
||||
loading={emailLoading}
|
||||
disabled={googleLoading}
|
||||
className="h-12 rounded-xl text-base font-medium bg-gradient-to-r from-blue-600 to-cyan-500 border-0 hover:from-blue-700 hover:to-cyan-600"
|
||||
>
|
||||
登录
|
||||
@@ -89,7 +91,8 @@ const Login = () => {
|
||||
icon={<GoogleOutlined />}
|
||||
block
|
||||
onClick={signInWithGoogle}
|
||||
loading={loading}
|
||||
loading={googleLoading}
|
||||
disabled={emailLoading}
|
||||
className="h-12 rounded-xl text-base font-medium mb-6 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600 border border-gray-200 dark:border-gray-600"
|
||||
>
|
||||
使用 Google 账号登录
|
||||
|
||||
Reference in New Issue
Block a user