fix al la posicion de donde se encuentra el carrito de compra y animacion al carrito al hacer hover

This commit is contained in:
Miguel Ortega committed 2026-08-24 22:03:16 -05:00
1 parent 2ae7091a3a
commit b76ae84bf6
6 files changed
+347 -96

No files matched your search

+10 -1
View File
@@ -3,12 +3,14 @@ import { useNavigate, Link } from 'react-router';
import { BrandLogo } from '../components/common/BrandLogo';
import { FiMail, FiLock, FiUser, FiArrowRight, FiCheckCircle } from 'react-icons/fi';
import { FaGraduationCap, FaChalkboardTeacher } from 'react-icons/fa';
import type { User } from '../types/course';
interface RegisterViewProps {
onShowToast: (msg: string) => void;
onLogin: (user: User) => void;
}
export const RegisterView: React.FC<RegisterViewProps> = ({ onShowToast }) => {
export const RegisterView: React.FC<RegisterViewProps> = ({ onShowToast, onLogin }) => {
const navigate = useNavigate();
const [name, setName] = useState('');
const [email, setEmail] = useState('');
@@ -18,6 +20,13 @@ export const RegisterView: React.FC<RegisterViewProps> = ({ onShowToast }) => {
const handleSubmit = (e: React.FormEvent) => {
e.preventDefault();
if (name && email && password) {
const newUser: User = {
id: Math.random().toString(36).substr(2, 9),
name,
email,
role: accountType,
};
onLogin(newUser);
onShowToast(`¡Cuenta de ${accountType === 'buyer' ? 'Estudiante' : 'Instructor'} creada con éxito!`);
navigate(accountType === 'seller' ? '/seller' : '/courses');
}