app: hide plugin header if there are no subpages for now

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2026-02-13 13:59:40 +01:00
parent 4d2b2642c0
commit 7b82dca42b
+28 -8
View File
@@ -74,19 +74,39 @@ export const PageLayout = SwappableComponentBlueprint.make({
component: SwappablePageLayout,
loader: () => (props: PageLayoutProps) => {
const { title, icon, noHeader, headerActions, tabs, children } = props;
if (tabs) {
return (
<Flex
direction="column"
style={{ flexGrow: 1, minHeight: 0, gap: 0 }}
>
{!noHeader && (
<Header
title={title}
icon={icon}
tabs={tabs}
customActions={headerActions}
/>
)}
<main
style={{
flex: '1 1 0',
minHeight: 0,
overflow: 'auto',
padding: 0,
margin: 0,
}}
>
{children}
</main>
</Flex>
);
}
return (
<Flex
direction="column"
style={{ flexGrow: 1, minHeight: 0, gap: 0 }}
>
{!noHeader && (
<Header
title={title}
icon={icon}
tabs={tabs}
customActions={headerActions}
/>
)}
<main
style={{
flex: '1 1 0',