Refactor layout and navigation components to remove unused motion props (#494)

- Replaced motion.header with a standard header in Layout component.
- Removed layout props from motion elements in NavigationAPI and NavigationDocs components for improved performance and clarity.
- Updated AnnouncementBannerProvider to make the banner always visible, removing scroll-based hiding logic.
This commit is contained in:
Brandon Hopkins
2025-11-25 11:03:25 -08:00
committed by GitHub
parent fb4b060710
commit cc0b4cd01b
4 changed files with 25 additions and 25 deletions

View File

@@ -178,8 +178,8 @@ export function Layout({ children, title, tableOfContents }) {
className="relative mx-auto flex max-w-8xl sm:px-2 lg:px-8 xl:px-12 lg:ml-72 xl:ml-80"
style={{ paddingTop: bannerHeight }}
>
<motion.header
layoutScroll
<header
// layoutScroll
className="contents lg:pointer-events-none lg:fixed lg:inset-0 lg:z-40 lg:flex"
style={{ top: bannerHeight }}
>
@@ -192,7 +192,7 @@ export function Layout({ children, title, tableOfContents }) {
<Header />
{router.route.startsWith("/ipa") ? <NavigationAPI className="hidden lg:mt-10 lg:block" tableOfContents={tableOfContents} /> : <NavigationDocs className="hidden lg:mt-10 lg:block" />}
</div>
</motion.header>
</header>
<div className="min-w-0 max-w-2xl flex-auto px-4 py-16 lg:max-w-none lg:pl-8 lg:pr-0 xl:px-5">
<main className="py-16">
<Prose as="article">{children}</Prose>