From 25da09352db71d000465313e466e063b2a926b55 Mon Sep 17 00:00:00 2001 From: Marlene-Angel <139193696+Marlene-Angel@users.noreply.github.com> Date: Mon, 22 Dec 2025 13:00:53 -0800 Subject: [PATCH] =?UTF-8?q?Corrige=20overflow=20del=20layout=20y=20autenti?= =?UTF-8?q?caci=C3=B3n=20de=20la=20API=20de=20proyectos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.css | 3 ++- src/App.tsx | 20 +++++++++++++++----- src/api/projects.ts | 3 ++- vite.config.ts | 12 ++++-------- 4 files changed, 23 insertions(+), 15 deletions(-) diff --git a/src/App.css b/src/App.css index 08cef4d..0d97e27 100644 --- a/src/App.css +++ b/src/App.css @@ -6,6 +6,7 @@ body, html, #root { padding: 0; height: 100%; font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif; + overflow-x: hidden; } /* ========================= @@ -21,7 +22,7 @@ body, html, #root { grid-template-columns: var(--sidebar-width) 1fr; grid-template-rows: 100vh; height: 100vh; - width: 100vw; + width: 100%; overflow: hidden; transition: grid-template-columns 0.3s ease; } diff --git a/src/App.tsx b/src/App.tsx index 183cf0d..3c761f4 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -39,11 +39,21 @@ export default function App() { }; return ( -
- -
- -
+ // Blindaje global del layout +
+ {/* Sidebar no debe encogerse */} +
+ +
+ + {/* min-w-0: evita que páginas anchas (tablas) empujen el layout */} +
+
+ +
+ + {/* Scroll solo aquí */} +
{renderPage()}
diff --git a/src/api/projects.ts b/src/api/projects.ts index 755cbec..78cfac4 100644 --- a/src/api/projects.ts +++ b/src/api/projects.ts @@ -3,8 +3,9 @@ export const PROJECTS_API_URL = `${API_BASE_URL}/api/v3/data/ppfu31vhv5gf6i0/m05 const API_TOKEN = import.meta.env.VITE_API_TOKEN; export const getAuthHeaders = () => ({ - Authorization: `Bearer ${API_TOKEN}`, "Content-Type": "application/json", + "xc-token": API_TOKEN, // NocoDB style + Authorization: `Bearer ${API_TOKEN}`, // fallback por si el backend usa Bearer }); export interface ProjectRecord { diff --git a/vite.config.ts b/vite.config.ts index ef01ba3..03f23ba 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,16 +2,12 @@ import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import tailwindcss from "@tailwindcss/vite"; -// https://vitejs.dev/config/ export default defineConfig({ plugins: [react(), tailwindcss()], - server: { - allowedHosts: [ - "localhost", - "127.0.0.1", - "reyna-compressive-shaunna.ngrok-free.dev", - ], + host: true, // expone en 0.0.0.0 + allowedHosts: "all", // permite dominios como *.ngrok-free.dev port: 5173, + strictPort: true, // no brinca de puerto }, -}); +}); \ No newline at end of file