Files
bsk/components/app-shell/app-shell.jsx
T
tiennm99 b47d8fc3d1 refactor: convert TypeScript sources to JavaScript with JSDoc types
- 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
2026-08-17 23:12:26 +07:00

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>
);
}