diff --git a/package.json b/package.json index d67d04a..8ccce53 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ }, "dependencies": { "axios": "^1.10.0", + "dependencies": "^0.0.1", "lucide-react": "^0.534.0", "react": "^19.1.0", "react-dom": "^19.1.0", diff --git a/src/api/services/auth.service.ts b/src/api/services/auth.service.ts index 66a2fc5..ed61ba2 100644 --- a/src/api/services/auth.service.ts +++ b/src/api/services/auth.service.ts @@ -60,4 +60,4 @@ export const authService = { login, register, getProfile, -}; +}; \ No newline at end of file diff --git a/src/components/layouts/NavBar.tsx b/src/components/layouts/NavBar.tsx index 43446f0..e52dcf2 100644 --- a/src/components/layouts/NavBar.tsx +++ b/src/components/layouts/NavBar.tsx @@ -27,6 +27,15 @@ export function NavBar() { navigate('/login'); }; + const handleApplyClick = () => { + if (!isAuthenticated) { + alert("Debes iniciar sesión para poder aplicar."); + navigate('/login'); + return; + } + navigate('/professor/apply'); + }; + return (
@@ -43,13 +52,15 @@ export function NavBar() {
- + {(!user || user.role === 'student') && ( + + )} {isLoading ? (
diff --git a/src/components/ui/Card.tsx b/src/components/ui/Card.tsx new file mode 100644 index 0000000..8a873f1 --- /dev/null +++ b/src/components/ui/Card.tsx @@ -0,0 +1,33 @@ +import type React from 'react'; + +const Card = ({ className, children, ...props }: React.HTMLAttributes) => ( +
+ {children} +
+); + +const CardHeader = ({ className, children, ...props }: React.HTMLAttributes) => ( +
+ {children} +
+); + +const CardTitle = ({ className, children, ...props }: React.HTMLAttributes) => ( +

+ {children} +

+); + +const CardDescription = ({ className, children, ...props }: React.HTMLAttributes) => ( +

+ {children} +

+); + +const CardContent = ({ className, children, ...props }: React.HTMLAttributes) => ( +
+ {children} +
+); + +export { Card, CardHeader, CardTitle, CardDescription, CardContent }; \ No newline at end of file diff --git a/src/components/ui/Label.tsx b/src/components/ui/Label.tsx new file mode 100644 index 0000000..e594a4c --- /dev/null +++ b/src/components/ui/Label.tsx @@ -0,0 +1,11 @@ +import type React from 'react'; + +type LabelProps = React.ComponentProps<'label'>; + +export const Label = ({ className, ...props }: LabelProps) => { + const baseClasses = "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"; + + return ( +