fix(webui): skip initial route entrance motion
Prevent the top-bar title and main route content from animating during the first authenticated render. This removes first-load flashing while preserving the existing transitions for subsequent navigation.
This commit is contained in:
2 files changed
+2
-2
No files matched your search
@@ -126,7 +126,7 @@ export function MainLayout({ status, onLogout, children }: MainLayoutProps) {
|
||||
<main className={cn('flex min-h-0 flex-1 flex-col')}>
|
||||
<ScrollArea className="flex-1 min-h-0" viewportClassName="[&>div]:!block">
|
||||
<div className="mx-auto w-full max-w-7xl px-4 py-5 sm:px-6 sm:py-6 lg:px-8 2xl:max-w-[1600px]">
|
||||
<AnimatePresence mode="wait">
|
||||
<AnimatePresence initial={false} mode="wait">
|
||||
<motion.div
|
||||
key={pathname}
|
||||
initial={reduce ? false : { opacity: 0, y: 10 }}
|
||||
|
||||
@@ -59,7 +59,7 @@ export function TopBar({
|
||||
)}
|
||||
|
||||
{/* Page title */}
|
||||
<AnimatePresence mode="wait">
|
||||
<AnimatePresence initial={false} mode="wait">
|
||||
<motion.div
|
||||
key={pathname}
|
||||
initial={{ opacity: 0, x: -8 }}
|
||||
|
||||
Reference in new issue
Block a user