mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-07 16:35:42 +00:00
16 lines
490 B
TypeScript
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>
|
|
);
|
|
}
|