Files
edr-platform/apps/edr-passenger-web/portal/src/components/PageTransition.tsx
2026-07-09 16:18:52 +03:00

16 lines
490 B
TypeScript

'use client';
import { usePathname } from 'next/navigation';
// Keying by pathname forces React to remount this wrapper on every route
// change, which restarts the CSS animation — a subtle fade/slide-up on each
// step of the booking flow, no animation library required.
export function PageTransition({ children }: { children: React.ReactNode }) {
const pathname = usePathname();
return (
<div key={pathname} className="animate-fade-in-up">
{children}
</div>
);
}