Skip to main content

PrivateRoute

PrivateRoute ⇒ React.Component

PrivateRoute component. This component is used to protect routes that require authentication. If the user is authenticated, it renders the passed component. If the user is not authenticated, it redirects to the signIn page.

Kind: global constant
Returns: React.Component - - The Component if the user is authenticated, otherwise a Navigate component to the signIn page.

ParamTypeDescription
propsObjectThe properties passed to the component.
props.componentReact.ComponentThe component to render if the user is authenticated.
props.restObjectThe rest of the properties passed to the component.