Skip to content

Commit 6941455

Browse files
committed
wip: deleted unnecessary comments
1 parent 6defffc commit 6941455

4 files changed

Lines changed: 7 additions & 21 deletions

File tree

src/components/landing/Footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function Footer() {
1111
<div className="w-8 h-8 bg-gradient-to-br from-blue-400 to-green-400 rounded-lg flex items-center justify-center">
1212
<BookOpen className="w-5 h-5 text-white" />
1313
</div>
14-
<span className="text-xl font-poppins font-bold">EduCursos</span>
14+
<span className="text-xl font-poppins font-bold">UpSkill</span>
1515
</Link>
1616
<p className="text-slate-300 text-sm leading-relaxed">
1717
La plataforma líder en educación online. Aprende nuevas habilidades, obtén certificaciones y avanza en tu carrera.

src/components/ui/Button.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,22 @@
11
import React from 'react';
22

3-
// Definimos las props que nuestro botón aceptará.
4-
// Extiende los atributos de un botón HTML normal para que podamos pasar 'type', 'onClick', etc.
53
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
6-
children: React.ReactNode; // El texto o ícono dentro del botón
7-
isLoading?: boolean; // Un booleano opcional para el estado de carga
4+
children: React.ReactNode;
5+
isLoading?: boolean;
86
}
97

108
const Button = ({ children, isLoading = false, ...props }: ButtonProps) => {
11-
// Aquí definimos las clases UNA SOLA VEZ.
129
const baseClasses = "w-full inline-flex items-center justify-center py-3 px-6 rounded-lg font-medium text-sm text-white bg-gradient-to-r from-primary-600 to-primary-700 shadow-medium hover:from-primary-700 hover:to-primary-800 hover:scale-[1.02] hover:shadow-strong transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed disabled:transform-none";
1310

1411
return (
1512
<button
1613
className={baseClasses}
1714
disabled={isLoading}
18-
{...props} // Pasamos todas las demás props (como type="submit") al botón real
15+
{...props}
1916
>
2017
{isLoading ? (
21-
// Muestra un spinner cuando isLoading es true
2218
<span className="animate-spin h-5 w-5 border-2 border-transparent border-t-white rounded-full"></span>
2319
) : (
24-
// Muestra el contenido normal si no
2520
children
2621
)}
2722
</button>

src/components/ui/Input.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,18 @@ import React, { useState } from 'react';
22
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
33
import { faEye, faEyeSlash } from '@fortawesome/free-solid-svg-icons';
44

5-
// Las props que aceptará nuestro Input
65
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
76
label: string;
8-
icon?: React.ReactNode; // Un nodo de React para el ícono (ej. <FontAwesomeIcon ... />)
9-
error?: string | null; // El mensaje de error a mostrar
7+
icon?: React.ReactNode;
8+
error?: string | null;
109
}
1110

1211
const Input = ({ label, id, type, icon, error, ...props }: InputProps) => {
1312
const [showPassword, setShowPassword] = useState(false);
1413
const isPassword = type === 'password';
1514

16-
// Determinamos el tipo de input a renderizar (para el toggle de la contraseña)
1715
const inputType = isPassword ? (showPassword ? 'text' : 'password') : type;
1816

19-
// Clases base para el input. La lógica del padding izquierdo se aplica si hay un ícono.
2017
const inputClasses = `w-full ${icon ? 'pl-10' : 'pl-4'} ${isPassword ? 'pr-10' : 'pr-4'} py-3 border rounded-lg text-base bg-white focus:outline-none focus:border-primary-500 focus:ring-2 focus:ring-primary-500/20 transition-all`;
2118

2219
return (

src/router/AppRouter.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
import { Routes, Route } from 'react-router-dom';
2-
3-
// Layouts
42
import MainLayout from '../components/layouts/MainLayout';
53
import AuthLayout from '../components/layouts/AuthLayout';
6-
7-
// Pages
8-
import LandingPage from '../pages/LandingPage'; // <-- ¡Importante!
4+
import LandingPage from '../pages/LandingPage';
95
import LoginPage from '../pages/Auth/LoginPage';
106
import RegisterPage from '../pages/Auth/RegisterPage';
117
import CourseListPage from '../pages/Course/CourseListPage';
128
import AdminDashboard from '../pages/Admin/AdminDashboard';
139
import ProfessorDashboard from '../pages/Professor/ProfessorDashboard';
1410
import UnauthorizedPage from '../pages/UnauthorizedPage';
15-
16-
// Security
1711
import ProtectedRoute from './ProtectedRoute';
1812

1913
const AppRouter = () => {

0 commit comments

Comments
 (0)