Skip to content

Commit 86cca2e

Browse files
fix: match navbar Suspense fallback wrapper to loaded state
The fallback rendered LogoSection without a wrapper div, but the loaded state wrapped it in a div with flex/shrink classes. This mismatch caused a layout shift when BrandContextMenu loaded.
1 parent d20c738 commit 86cca2e

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

src/components/Navbar.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,14 @@ export function Navbar({ children }: { children: React.ReactNode }) {
272272
<div className="flex items-center gap-2 font-black text-xl uppercase min-w-0">
273273
<React.Suspense
274274
fallback={
275-
<LogoSection
276-
menuButtonRef={menuButtonRef}
277-
setShowMenu={setShowMenu}
278-
showMenu={showMenu}
279-
title={Title}
280-
/>
275+
<div className={twMerge(`flex items-center group flex-shrink-0`)}>
276+
<LogoSection
277+
menuButtonRef={menuButtonRef}
278+
setShowMenu={setShowMenu}
279+
showMenu={showMenu}
280+
title={Title}
281+
/>
282+
</div>
281283
}
282284
>
283285
<LazyBrandContextMenu

0 commit comments

Comments
 (0)