Constructor
# <ProfileCard isAuthenticated setLoading showAlert updateUserInfo showWelcomePage done />
PropTypes:
| Name | Type | Required | Description | Default | 
|---|---|---|---|---|
| isAuthenticated | bool | Yes | Indicates if a user is authenticated | |
| setLoading | func | Yes | Tells Redux to show/hide the loading HUD (true for show and false for hide (i.e. remove)) | |
| showAlert | func | Yes | Tells Redux to show an alert | |
| updateUserInfo | func | Yes | Tells Redux to get updated user data from the server | |
| showWelcomePage | func | Yes | Tells Redux to show the welcome page | |
| done | func | Yes | Tells Redux that this component is no longer needed (i.e. done) | 
Extends
- Component
Members
# state
    ProfileCard component state
    Properties:
| Name | Type | Description | 
|---|---|---|
| formData | object | Form input values | 
| profilePicture | object | A profile picture image file | 
| firstName | string | The first name input value | 
| lastName | string | The last name input value | 
Methods
# static mapDispatchToProps(dispatch) → {object}
        Passes certain Redux actions to the ProfileCard 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 ProfileCard component
    
    
    
        
        
object
    
    
# static mapStateToProps(state) → {object}
        Gets the current state from Redux and passes parts of it to the ProfileCard component as props.
This function is used only by the react-redux connect function.
    
    
    Parameters:
| Name | Type | Description | 
|---|---|---|
| state | object | The Redux state | 
Redux state properties used in the ProfileCard component
    
    
    
        
        
object
    
    
# imageInputErrorHandler()
        Shows an alert and removes the image from state
    
    
# imageInputValueChangedHandler(event)
        Updates state with new file input image
    
    
    Parameters:
| Name | Type | Description | 
|---|---|---|
| event | The event that called this function | 
# removeImageHandler()
        Removes the current image from state
    
    
# render()
        Renders the ProfileCard component
    
    
# submitHandler(event)
        Submits the profile form
    
    
    Parameters:
| Name | Type | Description | 
|---|---|---|
| event | object | The event that called this function | 
# textInputValueChangedHandler(event)
        Updates state with new text input value
    
    
    Parameters:
| Name | Type | Description | 
|---|---|---|
| event | The event that called this function | 
# uploadData() → {promise}
        Uploads the profile picture to Firebase storage
Sends the user's first name and last name to the AWS server
    
    
    A promise that is waiting for the user data to upload
    
    
    
        
        
promise
    
    
# uploadProfilePicture() → {promise}
        Uploads the profile picture in the form to Firebase storage
    
    
    A promise that is waiting for the user's profile picture to upload
    
    
    
        
        
promise