useUser
Name | type | Description | params |
---|---|---|---|
user | Object | Current logged in user data | |
register | Function | function to register user | (email, phone, first_name, last_name, password, accepts_marketing, agree_terms ) |
login | Function | Function to login user. | ( username, password ) |
loginViaGoogle | Function | Login User via Google provider. | |
loginLoadingStatus | boolean | Key show loading in UI | |
isLoggedin | boolean | Key to check if user is logged in |
Example:
const { isLoggedin } = useUser();