diff --git a/app/signup/page.tsx b/app/signup/page.tsx index 323eda9..dd6506e 100644 --- a/app/signup/page.tsx +++ b/app/signup/page.tsx @@ -19,7 +19,7 @@ export default function SignupPage() { const [confirmPasswordError, setConfirmPasswordError] = useState(""); const [showPassword, setShowPassword] = useState(false); const [showConfirmPassword, setShowConfirmPassword] = useState(false); - const [agreeToTerms, setAgreeToTerms] = useState(false); + const [agreeToTerms, setAgreeToTerms] = useState(true); const router = useRouter(); /** Password validation function with English prompts */ @@ -124,7 +124,7 @@ export default function SignupPage() { router.push("/login?registered=true"); } catch (error: any) { console.error("Signup error:", error); - setFormError(error.msg || "Registration failed, please try again"); + setFormError(error.message || "Registration failed, please try again"); } finally { setIsSubmitting(false); } @@ -342,10 +342,9 @@ export default function SignupPage() { !!passwordError || !!confirmPasswordError || !password || - !confirmPassword || - !agreeToTerms + !confirmPassword } - className="flex-1 py-3 rounded-lg cursor-pointer bg-[#C039F6] hover:bg-[#C039F6]/80 text-white font-medium transition-colors disabled:opacity-70" + className="flex-1 py-3 rounded-lg cursor-pointer bg-[#C039F6] hover:bg-[#C039F6]/80 text-white font-medium transition-colors disabled:opacity-70 disabled:cursor-not-allowed" > {isSubmitting ? "Signing up..." : "Sign Up"} diff --git a/components/SmartChatBox/SmartChatBox.tsx b/components/SmartChatBox/SmartChatBox.tsx index ff7a812..90a7e38 100644 --- a/components/SmartChatBox/SmartChatBox.tsx +++ b/components/SmartChatBox/SmartChatBox.tsx @@ -1,5 +1,5 @@ import React, { useRef, useCallback, useState, useEffect } from "react"; -import { ChevronsRight, ChevronDown } from 'lucide-react'; +import { ChevronsRight, ChevronDown, X } from 'lucide-react'; import { Switch } from 'antd'; import { MessageRenderer } from "./MessageRenderer"; import { InputBar } from "./InputBar"; @@ -141,7 +141,7 @@ export default function SmartChatBox({ />