Skip to content

Latest commit

 

History

History

PrivateElement

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Private Element

Wrapper for React elements to return different components based on authentication status

import { PrivateElement } from '@dragonchain-dev/single-sign-on-component';

<PrivateElement fallback={<div>Login to view Account</div>}>
  <button type="button" onClick={() => viewAccount()}>Account</button>
</PrivateElement>

Properties

fallback node

Optional: A single node to show if a user is not authenticated.