Files
CIAgent/apps/web/components/page-transition.tsx
saksham 1a4c80958f Initial commit: CI Agent competitive-intelligence monitoring app
FastAPI + Celery + Next.js + Postgres/Redis app with company monitoring,
source collection, LLM-based change analysis, enrichment, and account
security (Turnstile, escalating lockout, email verification).
2026-08-05 10:48:20 -04:00

20 lines
610 B
TypeScript

"use client";
import { usePathname } from "next/navigation";
/**
* Next's App Router swaps route content instantly with no transition of its
* own. Keying a wrapper div on the pathname forces React to remount it on
* every navigation, which retriggers the `animate-fade-in` CSS animation
* (see tailwind.config.ts) - the same technique used for tab switches on the
* company detail page.
*/
export function PageTransition({ children }: { children: React.ReactNode }) {
const pathname = usePathname();
return (
<div key={pathname} className="animate-fade-in">
{children}
</div>
);
}