Components

UserWidget

<UserWidget name profilePictureUrl />

Renders the UserWidget component

Constructor

# <UserWidget name profilePictureUrl />

PropTypes:
Name Type Required Description Default
name string Yes The user's name
profilePictureUrl string No The user's profile picture url
Author:

View Source components/Header/UserWidget/UserWidget.js, line 16

Extends

  • Component

Members

# state

UserWidget component state
Properties:
Name Type Description
isProfilePictureError boolean Indicates if there was an error displaying the user's profile picture

View Source components/Header/UserWidget/UserWidget.js, line 21

Methods

# static mapStateToProps(state) → {object}

Gets the current state from Redux and passes parts of it to the UserWidget component as props. This function is used only by the react-redux connect function.
Parameters:
Name Type Description
state object The Redux state

View Source components/Header/UserWidget/UserWidget.js, line 64

Redux state properties used in the UserWidget component
object

# profilePictureErrorHandler()

Updates state indicating that there was a profile picture error

View Source components/Header/UserWidget/UserWidget.js, line 29

# render()

Renders the UserWidget component

View Source components/Header/UserWidget/UserWidget.js, line 36