Revert "fix: prevent layout shift in sticky navbar (#27256)"

This reverts commit 38492d5839.
This commit is contained in:
Alex van Andel
2026-02-10 13:09:04 +00:00
parent 0a68a189f2
commit ee1748dbee
2 changed files with 2 additions and 12 deletions
@@ -19,7 +19,7 @@ export default function AppsLayout({ children, actions, emptyStore, isAdmin, ...
const router = useRouter();
return (
<Shell {...rest} disableSticky={true} actions={actions?.("block")}>
<Shell {...rest} actions={actions?.("block")}>
<div className="flex flex-col xl:flex-row">
<main className="w-full">
{emptyStore ? (
+1 -11
View File
@@ -127,22 +127,15 @@ export default function Shell(props: LayoutProps) {
export function ShellMain(props: LayoutProps) {
const router = useRouter();
const { isLocaleReady } = useLocale();
const { bannersHeight } = useBanners();
const headerStyle =
!props.disableSticky && bannersHeight
? { top: `${bannersHeight}px` as const }
: undefined;
return (
<>
{(props.heading || !!props.backPath) && (
<div
style={headerStyle}
className={classNames(
"bg-default mb-0 flex items-center md:mb-6 md:mt-0",
props.smallHeading ? "lg:mb-7" : "lg:mb-8",
!props.disableSticky && "sticky top-0 z-10 md:fixed md:w-[calc(100%-3.5rem)] md:pt-3 md:pb-2 md:pl-5 md:left-14 lg:left-56 lg:w-[calc(100%-14rem)]"
!props.disableSticky && "sticky top-0 z-10"
)}>
{!!props.backPath && (
<Button
@@ -196,9 +189,6 @@ export function ShellMain(props: LayoutProps) {
)}
</div>
)}
{(props.heading || !!props.backPath) && !props.disableSticky && (
<div className="hidden md:block md:h-14" aria-hidden="true" />
)}
{props.afterHeading && <>{props.afterHeading}</>}
<div className={classNames(props.flexChildrenContainer && "flex flex-1 flex-col")}>
{props.children}