Components

ChoirMembers

<ChoirMembers choirId choirName showAlert />

Renders the ChoirMembers component. Shows all choir member profiles.

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
Author:

View Source components/ChoirMembers/ChoirMembers.js, line 30

Extends

  • Component

Members

# _isMounted

Indicates if the component is mounted. Used for asynchronous tasks.
See:

View Source components/ChoirMembers/ChoirMembers.js, line 46

# state

ChoirMembers component state
Properties:
Name Type Description
isLoading boolean Indicates if the component is in a loading state
members array A list of choir members

View Source components/ChoirMembers/ChoirMembers.js, line 36

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

View Source components/ChoirMembers/ChoirMembers.js, line 250

Redux state properties used in the ChoirMembers component
object

# componentDidMount()

Sets _isMounted to true Gets the choir members

View Source components/ChoirMembers/ChoirMembers.js, line 52

# componentWillUnmount()

Sets _isMounted to false

View Source components/ChoirMembers/ChoirMembers.js, line 62

# 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

View Source components/ChoirMembers/ChoirMembers.js, line 171

A MemberCard component
object

# getMemberCards() → {object}

Gets an array of admin member cards and an array of student member cards

View Source components/ChoirMembers/ChoirMembers.js, line 137

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.

View Source components/ChoirMembers/ChoirMembers.js, line 71

# getMembersProfilePictures()

Gets each member's profile picture url. Updates state with the url.

View Source components/ChoirMembers/ChoirMembers.js, line 105

# render()

Renders the ChoirMembers component

View Source components/ChoirMembers/ChoirMembers.js, line 186