mirror of
https://github.com/tiennm99/bsk.git
synced 2026-08-25 16:25:53 +00:00
- app/, components/, lib/, i18n/, tests/, proxy renamed via git mv - types carried into JSDoc: @template generics, @typedef aliases, /** @type */ casts where TS had as-casts or non-null assertions - role tuple keeps its const assertion; the db-enum drift guard now checks the tuple values against the generated enum type - use client/use server directives and server-only imports preserved - prettier-formatted; vitest suite unchanged
31 lines
937 B
React
31 lines
937 B
React
/**
|
|
* 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 { Sidebar } from "@/components/app-shell/sidebar";
|
|
import { AppShellFrame } from "@/components/app-shell/app-shell-frame";
|
|
|
|
/**
|
|
* @typedef {object} AppShellProps
|
|
* @property {string} email
|
|
* @property {string | null} fullName
|
|
* @property {import("@/lib/db/roles").AppRole} role
|
|
* @property {string} locale
|
|
* @property {import("react").ReactNode} children
|
|
*/
|
|
|
|
/** @param {AppShellProps} props */
|
|
export function AppShell({ email, fullName, role, locale, children }) {
|
|
return (
|
|
<AppShellFrame
|
|
sidebar={<Sidebar email={email} fullName={fullName} role={role} locale={locale} />}
|
|
>
|
|
{children}
|
|
</AppShellFrame>
|
|
);
|
|
}
|