- Install @biomejs/biome as devDependency at root - Configure biome.json with 2-space indent, double quotes, Tailwind CSS support - Add lint/lint:fix/format/format:fix scripts to root and app package.json - Fix noNonNullAssertion: env vars extracted to variables with suppression, <div role=button> replaced with <button> - Fix noUnusedVariables: remove unused destructured vars - Fix useIterableCallbackReturn: arrow functions with block body - Fix noExplicitAny: recharts Tooltip formatters - Fix noLabelWithoutControl: add htmlFor+id or use <span> for non-input labels - Fix noStaticElementInteractions/useKeyWithClickEvents: role+keyboard events for overlays - Fix noArrayIndexKey: use error string as key - Fix CSS parse: enable tailwindDirectives parser - Normalize formatting across 80 files with biome check --write
23 lines
670 B
TypeScript
23 lines
670 B
TypeScript
import { Outlet } from "@tanstack/react-router";
|
|
import { useState } from "react";
|
|
import { LoadingBar } from "@/components/ui/loading-bar";
|
|
import { Header } from "./Header";
|
|
import { Sidebar } from "./Sidebar";
|
|
|
|
export function Layout() {
|
|
const [sidebarOpen, setSidebarOpen] = useState(false);
|
|
|
|
return (
|
|
<div className="flex min-h-screen">
|
|
<LoadingBar />
|
|
<Sidebar open={sidebarOpen} onClose={() => setSidebarOpen(false)} />
|
|
<div className="flex flex-1 flex-col">
|
|
<Header onMenuClick={() => setSidebarOpen(true)} />
|
|
<main className="flex-1 px-3 py-4 sm:p-6">
|
|
<Outlet />
|
|
</main>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|