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.
Param | Type | Description |
---|---|---|
props | Object | The properties passed to the component. |
props.component | React.Component | The component to render if the user is authenticated. |
props.rest | Object | The rest of the properties passed to the component. |