f72b775379
- categorie A: alle catch(e: any) → catch(e: unknown) met instanceof check - categorie B: stille .catch() logging toegevoegd (SWRegister, admin, upload, auth) - categorie C: hardcoded 192.168.1.176 IPs vervangen door env var defaults - categorie D: page files >250L gesplitst (history, settings, explorer, admin/payment, ipns, users, upload, dashboard) in helpers/components - categorie E: eslint-disable vervangen in SearchInput.tsx - src/lib/config.ts centrale config module (localhost defaults) - CSP in next.config.ts dynamisch via env var - deploy.sh: geen hardcoded IP meer (REQUIRED arg) - lib/api/ lib/auth/ lib/wallet/ lib/search-index/ lib/storage/ gesplitst in modules - ongebruikte bestanden verwijderd: api.ts, auth.tsx, wallet.ts, search-index.ts, PaymentPanel.tsx, SearchBar.tsx, proxy.ts, serve-static.js
25 lines
746 B
TypeScript
25 lines
746 B
TypeScript
'use client';
|
|
|
|
import PortalSidebar from '@/components/PortalSidebar';
|
|
import PortalHeader from '@/components/PortalHeader';
|
|
|
|
interface PortalLayoutProps {
|
|
children: React.ReactNode;
|
|
/** Optional custom header. Defaults to <PortalHeader /> if omitted. */
|
|
header?: React.ReactNode;
|
|
/** Optional custom sidebar. Defaults to <PortalSidebar /> if omitted. */
|
|
sidebar?: React.ReactNode;
|
|
}
|
|
|
|
export default function PortalLayout({ children, header, sidebar }: PortalLayoutProps) {
|
|
return (
|
|
<div className="flex min-h-screen">
|
|
{sidebar ?? <PortalSidebar />}
|
|
<div className="flex-1 flex flex-col ml-56">
|
|
{header ?? <PortalHeader />}
|
|
<main className="flex-1 p-6">{children}</main>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|