Constructor
# <Welcome done signOut />
PropTypes:
Name | Type | Required | Description | Default |
---|---|---|---|---|
done |
func | Yes | Tells Redux that this component is no longer needed (i.e. done) | |
signOut |
func | Yes | Tells Redux to sign the user out |
Extends
- Component
Members
# _wasEmailVerificationCheckedAlready
Indicates if the user's email was checked for verification at least once
# state
Welcome component state
Properties:
Name | Type | Description |
---|---|---|
isLoading |
boolean | Indicates if the component is in a loading state |
isUserEmailVerified |
boolean | Indicates if the user's email is verified |
Methods
# static mapDispatchToProps(dispatch) → {object}
Passes certain Redux actions to the Welcome component as props.
This function is used only by the react-redux connect function.
Parameters:
Name | Type | Description |
---|---|---|
dispatch |
function | The react-redux dispatch function |
Redux actions used in the Welcome component
object
# checkIfUserEmailIsVerified()
Checks if the user's email is verified.
Updates state depending on result.
# componentDidMount()
Checks if the user's email is verified
# doneButtonClickedHandler()
Tells Redux that this component is no longer needed (i.e. done)
# emailWasSentHandler()
Updates state to indicate that a verification email was sent.
Alerts the user that a verification email was sent.
# getCheckEmailComponent() → {object}
Creates a check email component
A check email component (JSX)
object
# getMainComponent() → {object}
Gets the main component (loading spinner, success, or check email)
The main component (JSX)
object
# resendEmailVerificationButtonClickedHandler()
Resends an email verification
# userEmailFetchError(error)
Updates the state to indicate that the email is not verified.
Alerts the user that there was an error.
Parameters:
Name | Type | Description |
---|---|---|
error |
object | The error received |
# userEmailIsVerified()
Updates state to indicate that the email is verified
# userEmailNotVerified()
Updates state to indicate that the email is not verified
Alerts the user that the email is not verified