Files
bsk/components/app-shell/app-shell.tsx
T
tiennm99 653aca1d1b feat(ui): clinician-focused UX pass
- responsive app shell: persistent sidebar at md+, accessible off-canvas
  drawer (focus trap, Esc, dialog semantics) + hamburger below md
- active-route highlight, localized role labels, greet by name
- visible focus rings, AA-contrast muted text, 44px primary actions
- sign-in: autofocus, show/hide password, always-enabled submit
- Be Vietnam Pro via next/font; prefers-reduced-motion guard; skip-link
2026-07-25 01:51:50 +07:00

31 lines
890 B
TypeScript

/**
* AppShell — Server Component.
*
* Renders the server-side Sidebar and hands it to AppShellFrame, which owns the
* responsive chrome (persistent at md+, off-canvas drawer below md). Receives
* user info from the (app) layout which has already validated session + role.
*/
import type { ReactNode } from "react";
import type { AppRole } from "@/lib/db/roles";
import { Sidebar } from "@/components/app-shell/sidebar";
import { AppShellFrame } from "@/components/app-shell/app-shell-frame";
type AppShellProps = {
email: string;
fullName: string | null;
role: AppRole;
locale: string;
children: ReactNode;
};
export function AppShell({ email, fullName, role, locale, children }: AppShellProps) {
return (
<AppShellFrame
sidebar={<Sidebar email={email} fullName={fullName} role={role} locale={locale} />}
>
{children}
</AppShellFrame>
);
}