ImpersonationBanner
ImpersonationBanner(
props):Element|null
Defined in: packages/ui/src/components/impersonation-banner.tsx:24
Persistent banner shown when an admin is impersonating another user.
Reads the current user from @cfast/auth via useCurrentUser(). When the
user has isImpersonating set, renders a warning alert with the impersonated
user’s name/email and a “Stop Impersonating” button that posts to stopAction.
Hidden when not impersonating.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Element | null
Example
Section titled “Example”// In your root layout:<ImpersonationBanner />
// With custom stop action URL:<ImpersonationBanner stopAction="/api/stop-impersonation" />