Constructor
# <ChoirMembers choirId choirName showAlert />
PropTypes:
Name | Type | Required | Description | Default |
---|---|---|---|---|
choirId |
string | Yes | The id of the selected choir | |
choirName |
string | Yes | The name of the selected choir | |
showAlert |
func | Yes | Shows an alert |
Extends
- Component
Members
Methods
# static mapStateToProps(state) → {object}
Gets the current state from Redux and passes parts of it to the ChoirMembers 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 ChoirMembers component
object
# componentDidMount()
Sets _isMounted to true
Gets the choir members
# componentWillUnmount()
Sets _isMounted to false
# createMemberCard(member, color) → {object}
Creates a member card component
Parameters:
Name | Type | Description |
---|---|---|
member |
object | The member data used to create the member card |
color |
string | The color to use for the card |
A MemberCard component
object
# getMemberCards() → {object}
Gets an array of admin member cards and an array of student member cards
An object containing an array of admin MemberCard components and an array of student MemberCard components
object
# getMembers()
Gets the choir members from the server.
Updates state with the members.
# getMembersProfilePictures()
Gets each member's profile picture url.
Updates state with the url.
# render()
Renders the ChoirMembers component