Corrige overflow del layout y autenticación de la API de proyectos
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
20
src/App.tsx
20
src/App.tsx
@@ -39,11 +39,21 @@ export default function App() {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="flex h-screen">
|
||||
<Sidebar setPage={setPage} />
|
||||
<div className="flex-1 flex flex-col">
|
||||
<TopMenu />
|
||||
<main className="flex-1 overflow-auto">
|
||||
// Blindaje global del layout
|
||||
<div className="flex h-screen w-full overflow-hidden">
|
||||
{/* Sidebar no debe encogerse */}
|
||||
<div className="shrink-0">
|
||||
<Sidebar setPage={setPage} />
|
||||
</div>
|
||||
|
||||
{/* min-w-0: evita que páginas anchas (tablas) empujen el layout */}
|
||||
<div className="flex min-w-0 flex-1 flex-col">
|
||||
<div className="shrink-0">
|
||||
<TopMenu />
|
||||
</div>
|
||||
|
||||
{/* Scroll solo aquí */}
|
||||
<main className="min-w-0 flex-1 overflow-auto">
|
||||
{renderPage()}
|
||||
</main>
|
||||
</div>
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user