Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(ui): header positioning with active PaymentBanner (#10406)

Marc Klingen9b72b63fc5e2
diff --git a/web/src/components/layouts/container-page.tsx b/web/src/components/layouts/container-page.tsx
index 670e96b384..21d36c916a 100644
--- a/web/src/components/layouts/container-page.tsx
+++ b/web/src/components/layouts/container-page.tsx
@@ -2,7 +2,6 @@ import PageHeader, {
type PageHeaderProps,
} from "@/src/components/layouts/page-header";
import { cn } from "@/src/utils/tailwind";
-import { useSupportDrawer } from "@/src/features/support-chat/SupportDrawerProvider";
type SettingsContainerProps = {
children: React.ReactNode;
@@ -10,18 +9,11 @@ type SettingsContainerProps = {
};
const ContainerPage = ({ children, headerProps }: SettingsContainerProps) => {
- const { open: supportDrawerIsOpen } = useSupportDrawer();
-
return (
<div
className={cn("relative flex min-h-screen-with-banner flex-1 flex-col")}
>
- <header
- className={cn(
- "sticky z-50 w-full",
- supportDrawerIsOpen ? "top-0" : "top-banner-offset", // if the support drawer is open the parent element changes (see layout.tsx) and we need to adjust the top position
- )}
- >
+ <header className="sticky top-0 z-50 w-full">
<PageHeader {...headerProps} container />
</header>
<main
diff --git a/web/src/components/layouts/page.tsx b/web/src/components/layouts/page.tsx
index fa5008991e..cd5e7077ed 100644
--- a/web/src/components/layouts/page.tsx
+++ b/web/src/components/layouts/page.tsx
@@ -2,7 +2,6 @@ import PageHeader, {
type PageHeaderProps,
} from "@/src/components/layouts/page-header";
import { cn } from "@/src/utils/tailwind";
-import { useSupportDrawer } from "@/src/features/support-chat/SupportDrawerProvider";
type PageContainerProps = {
children: React.ReactNode;
@@ -17,8 +16,6 @@ const Page = ({
scrollable = false,
withPadding = false,
}: PageContainerProps) => {
- const { open: supportDrawerIsOpen } = useSupportDrawer();
-
return (
<div
className={cn(
@@ -27,12 +24,7 @@ const Page = ({
)}
id="page"
>
- <header
- className={cn(
- "sticky z-50 w-full",
- supportDrawerIsOpen ? "top-0" : "top-banner-offset", // if the support drawer is open the parent element changes (see layout.tsx) and we need to adjust the top position
- )}
- >
+ <header className="sticky top-0 z-50 w-full">
<PageHeader {...headerProps} container={false} className={"top-0"} />
</header>
<main