UNPKG

@brightlayer-ui/react-auth-workflow

Version:

Re-usable workflow components for Authentication and Registration within Eaton applications.

20 lines (19 loc) 730 B
import { JSX } from 'react'; type ReactRouterGuestProps = { children?: JSX.Element; isAuthenticated: boolean; fallBackUrl: string; }; /** * Component that renders a conditional Route. If the user is already authenticated, this route * will redirect back to the prior route. If the user is not authenticated, it will render the provided * content. * * @param children The element/route to render if the user is not authenticated * @param isAuthenticated Indicates whether the user is authenticated or not * @param fallBackUrl URL where to redirect if user is authenticated * * @category Component */ export declare const ReactRouterGuestGuard: (props: ReactRouterGuestProps) => JSX.Element | null; export {};