diff --git a/src/components/Header.tsx b/src/components/Header.tsx index fa9bbde..ee7d3af 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -1,7 +1,6 @@ import { Link } from '@tanstack/react-router' - -import { useState } from 'react' import { Home, Menu, Network, X } from 'lucide-react' +import { useState } from 'react' export default function Header() { const [isOpen, setIsOpen] = useState(false) diff --git a/src/components/dashboard/DashboardHeader.tsx b/src/components/dashboard/DashboardHeader.tsx index 61d7531..9168cae 100644 --- a/src/components/dashboard/DashboardHeader.tsx +++ b/src/components/dashboard/DashboardHeader.tsx @@ -2,23 +2,23 @@ import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar' import { Badge } from '@/components/ui/badge' interface DashboardHeaderProps { - name: string - role: string - department: string - greeting?: string + nombre: string + rol: string + facultad: string + saludo?: string } export default function DashboardHeader({ - name, - role, - department, - greeting = 'Buenas noches,', + nombre, + rol, + facultad, + saludo = 'Buenas noches,', }: DashboardHeaderProps) { // Generamos la URL de DiceBear dinámicamente con el nombre - const dicebearUrl = `https://api.dicebear.com/9.x/initials/svg?seed=${encodeURIComponent(name)}` + const dicebearUrl = `https://api.dicebear.com/9.x/initials/svg?seed=${encodeURIComponent(nombre)}` // Calculamos iniciales de respaldo por si falla la imagen - const initials = name + const initials = nombre .split(' ') .map((n) => n[0]) .slice(0, 2) @@ -30,17 +30,17 @@ export default function DashboardHeader({
{/* 1. Avatar de DiceBear usando el componente de Shadcn */} - + {initials}
{/* Saludo con texto secundario */} -

{greeting}

+

{saludo}

{/* Nombre destacado */}

- {name} + {nombre}

@@ -49,17 +49,17 @@ export default function DashboardHeader({ variant="secondary" className="rounded-md px-2 py-0 text-xs font-semibold" > - {role} + {rol} {/* Departamento */} - {department} + {facultad}
-
+
Icono diff --git a/src/components/plan_estudios/PlanEstudiosCard.tsx b/src/components/plan_estudios/PlanEstudiosCard.tsx index b2e9c81..16408d9 100644 --- a/src/components/plan_estudios/PlanEstudiosCard.tsx +++ b/src/components/plan_estudios/PlanEstudiosCard.tsx @@ -1,4 +1,7 @@ -import { ArrowRight, type LucideIcon } from 'lucide-react' +import { ArrowRight } from 'lucide-react' + +import type {LucideIcon} from 'lucide-react'; + import { Badge } from '@/components/ui/badge' import { Card, CardContent, CardFooter, CardHeader } from '@/components/ui/card' import { cn } from '@/lib/utils' // Asegúrate de tener tu utilidad cn diff --git a/src/components/ui/avatar.tsx b/src/components/ui/avatar.tsx index b7224f0..5a6986a 100644 --- a/src/components/ui/avatar.tsx +++ b/src/components/ui/avatar.tsx @@ -1,5 +1,5 @@ -import * as React from "react" import * as AvatarPrimitive from "@radix-ui/react-avatar" +import * as React from "react" import { cn } from "@/lib/utils" diff --git a/src/components/ui/badge.tsx b/src/components/ui/badge.tsx index fd3a406..360f68d 100644 --- a/src/components/ui/badge.tsx +++ b/src/components/ui/badge.tsx @@ -1,6 +1,8 @@ -import * as React from "react" import { Slot } from "@radix-ui/react-slot" -import { cva, type VariantProps } from "class-variance-authority" +import { cva } from "class-variance-authority" +import * as React from "react" + +import type {VariantProps} from "class-variance-authority"; import { cn } from "@/lib/utils" diff --git a/src/lib/utils.ts b/src/lib/utils.ts index fed2fe9..b3ab9f2 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -1,6 +1,8 @@ -import { clsx, type ClassValue } from 'clsx' +import { clsx } from 'clsx' import { twMerge } from 'tailwind-merge' -export function cn(...inputs: ClassValue[]) { +import type {ClassValue} from 'clsx'; + +export function cn(...inputs: Array) { return twMerge(clsx(inputs)) } diff --git a/src/main.tsx b/src/main.tsx index e4d6425..e43730c 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,14 +1,12 @@ +import { RouterProvider, createRouter } from '@tanstack/react-router' import { StrictMode } from 'react' import ReactDOM from 'react-dom/client' -import { RouterProvider, createRouter } from '@tanstack/react-router' import * as TanStackQueryProvider from './integrations/tanstack-query/root-provider.tsx' - -// Import the generated route tree +import reportWebVitals from './reportWebVitals.ts' import { routeTree } from './routeTree.gen' import './styles.css' -import reportWebVitals from './reportWebVitals.ts' // Create a new router instance diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx index 801b3c3..bb05b48 100644 --- a/src/routes/__root.tsx +++ b/src/routes/__root.tsx @@ -1,9 +1,8 @@ +import { TanStackDevtools } from '@tanstack/react-devtools' import { Outlet, createRootRouteWithContext } from '@tanstack/react-router' import { TanStackRouterDevtoolsPanel } from '@tanstack/react-router-devtools' -import { TanStackDevtools } from '@tanstack/react-devtools' import Header from '../components/Header' - import TanStackQueryDevtools from '../integrations/tanstack-query/devtools' import type { QueryClient } from '@tanstack/react-query' diff --git a/src/routes/dashboard.tsx b/src/routes/dashboard.tsx index b5895ff..56bbe57 100644 --- a/src/routes/dashboard.tsx +++ b/src/routes/dashboard.tsx @@ -1,4 +1,4 @@ -import DashboardHeader from '@/components/dashboard/DashboardHeader' +import { createFileRoute } from '@tanstack/react-router' import { ArrowRight, BookOpenText, @@ -11,8 +11,9 @@ import { PencilRuler, ClipboardCheck, } from 'lucide-react' + +import DashboardHeader from '@/components/dashboard/DashboardHeader' import PlanEstudiosCard from '@/components/plan_estudios/PlanEstudiosCard' -import { createFileRoute } from '@tanstack/react-router' export const Route = createFileRoute('/dashboard')({ component: RouteComponent, @@ -31,9 +32,9 @@ function RouteComponent() { */}
diff --git a/src/routes/demo/tanstack-query.tsx b/src/routes/demo/tanstack-query.tsx index 3e07dae..40a282c 100644 --- a/src/routes/demo/tanstack-query.tsx +++ b/src/routes/demo/tanstack-query.tsx @@ -1,5 +1,5 @@ -import { createFileRoute } from '@tanstack/react-router' import { useQuery } from '@tanstack/react-query' +import { createFileRoute } from '@tanstack/react-router' export const Route = createFileRoute('/demo/tanstack-query')({ component: TanStackQueryDemo, diff --git a/src/routes/index.tsx b/src/routes/index.tsx index b285335..12fced0 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -1,4 +1,5 @@ import { createFileRoute } from '@tanstack/react-router' + import logo from '../logo.svg' export const Route = createFileRoute('/')({ diff --git a/vite.config.ts b/vite.config.ts index c9b3b62..06ba04b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,4 +1,5 @@ import { fileURLToPath, URL } from "node:url"; + import tailwindcss from "@tailwindcss/vite"; import { devtools } from "@tanstack/devtools-vite"; import { tanstackRouter } from "@tanstack/router-plugin/vite";