Files
webshop/shop/components/HeaderWrapper.tsx
DanielS e0d9c1d20e fix(wizard): fix UI/UX and usability glitches
- constrain viewport height on wizard routes in HeaderWrapper

- remove nested scrollbar in step-software

- add active module glows and tooltips for locked licenses

- show device name badge in step 3 card header when editing

- update main action button text in summary sidebar when editing

- implement double-click inline delete confirmation in step-summary

- animate customer accordion and add tab-index key bindings
2026-08-20 17:16:25 +02:00

42 lines
1.2 KiB
TypeScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"use client";
import { usePathname } from "next/navigation";
import { DemoWrapper } from "./DemoWrapper";
interface HeaderWrapperProps {
navbar: React.ReactNode;
children: React.ReactNode;
}
export function HeaderWrapper({ navbar, children }: HeaderWrapperProps) {
const pathname = usePathname();
const isAdmin = pathname?.startsWith("/admin");
const isSetup = pathname === "/setup";
if (isAdmin || isSetup) {
return <>{children}</>;
}
const isWizard = pathname === "/order" || pathname === "/wizard";
return (
<div className={`flex flex-col ${isWizard ? "h-screen overflow-hidden" : "min-h-screen"} bg-slate-50 text-slate-900 dark:bg-[#020617] dark:text-white`}>
{/* Demo Banner */}
<DemoWrapper>
<div
id="demo-banner"
className="bg-amber-500/10 border-b border-amber-500/20 py-2 px-4 text-center text-xs text-amber-600 dark:text-amber-400 font-medium tracking-wide z-50"
>
Dies ist eine **Demo-Webseite (Dummy-Shop)**. Es werden keine echten Bestellungen verarbeitet oder Zahlungen abgewickelt.
</div>
</DemoWrapper>
{navbar}
<main className={`flex-1 ${isWizard ? "overflow-hidden" : ""}`}>
{children}
</main>
</div>
);
}