Files
errors.bitreport.pt/admin-ui/components/AppShell.tsx
T
1sonhadorandPaperclip b0b733d5e1 feat(BIT-247): consolidate error reporting repo from OTT
Merge ingest-api, collector-worker, admin-ui, database/error_reporting, deploy/lxc,
docker-compose, and deployment docs into the dedicated repository. Paths updated
for repo root (ER_REPO_ROOT, systemd WorkingDirectory). Root README documents layout.

Co-Authored-By: Paperclip <[email protected]>
2026-03-22 18:20:27 +00:00

59 lines
2.1 KiB
TypeScript

import Link from "next/link";
import type { ReactNode } from "react";
export function AppShell({
children,
title,
breadcrumb,
}: {
children: ReactNode;
title: string;
breadcrumb?: { label: string; href?: string }[];
}) {
return (
<div className="er-app d-flex min-vh-100">
<aside className="er-sidebar text-white d-flex flex-column flex-shrink-0 p-3">
<Link href="/" className="text-white text-decoration-none fs-5 fw-semibold mb-4">
BitReport
<span className="d-block small text-white-50 fw-normal">Error reporting</span>
</Link>
<nav className="nav flex-column gap-1">
<Link className="nav-link text-white-50 er-nav-link" href="/">
Painel
</Link>
<Link className="nav-link text-white-50 er-nav-link" href="/incidents">
Incidentes
</Link>
</nav>
<div className="mt-auto small text-white-50 pt-4">
UI shell ·{" "}
<abbr title="Consistência visual com template Velzon (Bootstrap 5)">Velzon base</abbr>
</div>
</aside>
<div className="flex-grow-1 d-flex flex-column min-vw-0">
<header className="er-topbar border-bottom bg-body px-4 py-3 d-flex align-items-center justify-content-between">
<div>
<h1 className="h5 mb-1">{title}</h1>
{breadcrumb && breadcrumb.length > 0 ? (
<nav aria-label="breadcrumb">
<ol className="breadcrumb mb-0 small">
{breadcrumb.map((b, idx) => (
<li
key={`${b.label}-${idx}`}
className={`breadcrumb-item${b.href ? "" : " active"}`}
{...(!b.href ? { "aria-current": "page" } : {})}
>
{b.href ? <Link href={b.href}>{b.label}</Link> : b.label}
</li>
))}
</ol>
</nav>
) : null}
</div>
</header>
<main className="flex-grow-1 p-4 er-main">{children}</main>
</div>
</div>
);
}