FEAT: Faster Border Animation on Submit

When User Submit Registration, border animation rotates 360 degrees every 1 sec.

May seem weird when reset
This commit is contained in:
EvanLin3141
2025-01-29 20:12:46 +00:00
parent 4d9e819b39
commit 06234bcac2
4 changed files with 44 additions and 20 deletions

View File

@@ -18,7 +18,11 @@ interface FormErrors {
general?: string; // For general authentication errors
}
const RegisterForm: React.FC = () => {
interface SubmitProps {
onSubmit: () => void; // Add the prop for the callback
}
const RegisterForm: React.FC<SubmitProps> = ({ onSubmit }) => {
const { setIsLoggedIn } = useAuth();
const [formData, setFormData] = useState<RegisterFormData>({
@@ -58,6 +62,7 @@ const RegisterForm: React.FC = () => {
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
onSubmit();
if (validateForm()) {
try {