Files
frontend/apps/st/src/shared/ui/statistics-page-layout.tsx
T
2026-02-12 10:22:35 +09:00

25 lines
727 B
TypeScript

import { PageTitle } from "@common/components";
import { useTabStore } from "@/store/tab-store";
import { TabBar } from "./tab-bar";
function StatisticsPageLayout({ children }: { children: React.ReactNode }) {
const { activeTabId, tabs } = useTabStore();
const pageTitle = tabs.find((t) => t.menuItem.menuEngNm === activeTabId);
const menuPaths = pageTitle?.path?.split(">").map((path) => path.trim());
return (
<div className="h-auto min-h-full bg-container pb-2">
<TabBar />
<PageTitle
title={pageTitle?.label ?? ""}
menuPaths={menuPaths ?? []}
/>
{children}
</div>
);
}
export { StatisticsPageLayout };