feat: update API endpoints to use production URL and enhance UI components in authenticated routes

This commit is contained in:
2025-08-25 15:07:09 -06:00
parent 012a5a58b0
commit 602c5dbb31
5 changed files with 27 additions and 31 deletions

View File

@@ -13,7 +13,7 @@ import {
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu"
import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet"
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, SheetTrigger } from "@/components/ui/sheet"
import { ModeToggle } from "@/components/mode-toggle"
import {
Menu,
@@ -94,17 +94,17 @@ function Layout() {
</Button>
</SheetTrigger>
<SheetContent side="left" className="p-0">
<Sidebar onNavigate={() => { }} />
<SheetHeader>
<SheetTitle>Menú de Navegación</SheetTitle>
</SheetHeader> <Sidebar onNavigate={() => { }} />
</SheetContent>
</Sheet>
{/* Brand */}
<Link to={user.isAdmin ? "/dashboard" : "/planes"} className="hidden items-center gap-2 md:flex">
<span className="inline-flex h-8 w-8 items-center justify-center rounded-xl bg-primary/10 text-primary font-bold">U</span>
<div className="flex flex-col leading-tight">
<span className="font-semibold tracking-tight">La Salle · Ingeniería</span>
<span className="text-[10px] text-muted-foreground font-mono uppercase tracking-wider">Génesis</span>
</div>
<span className="inline-flex h-8 w-25 items-center justify-center rounded-xl bg-primary/10 text-primary font-bold">
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS8C2SvZe281wTNc9werkudO9aJiX3dOZm9T3s5DAfS0OUOvDbgc_WC61U_esY8GE8bZoI&usqp=CAU" alt="" />
</span>
</Link>
{/* Search */}
@@ -154,13 +154,7 @@ function Sidebar({ onNavigate }: { onNavigate?: () => void }) {
return (
<div className="h-full">
<div className="flex items-center gap-2 p-4 md:hidden">
<span className="inline-flex h-8 w-8 items-center justify-center rounded-xl bg-primary/10 text-primary font-bold">U</span>
<div className="leading-tight">
<span className="font-semibold">La Salle · Ingeniería</span>
<div className="text-[10px] text-muted-foreground font-mono uppercase tracking-wider">Génesis</div>
</div>
</div>
<Separator />
<ScrollArea className="h-[calc(100%-4rem)] p-2">
<nav className="grid gap-1 p-2">
@@ -181,6 +175,7 @@ function Sidebar({ onNavigate }: { onNavigate?: () => void }) {
{canSeeCarreras && (
<Link
to="/carreras"
key='/carreras'
activeOptions={{ exact: true }}
activeProps={{ className: "bg-primary/10 text-foreground" }}
className="group inline-flex items-center gap-3 rounded-xl px-3 py-2 text-sm text-muted-foreground hover:bg-primary/10 hover:text-foreground"
@@ -193,6 +188,7 @@ function Sidebar({ onNavigate }: { onNavigate?: () => void }) {
{isAdmin && (
<Link
to="/facultades"
key='facultades'
activeOptions={{ exact: true }}
activeProps={{ className: "bg-primary/10 text-foreground" }}
className="group inline-flex items-center gap-3 rounded-xl px-3 py-2 text-sm text-muted-foreground hover:bg-primary/10 hover:text-foreground"