Skip to content

Commit 3ac6a7a

Browse files
committed
Add numbers for helpyourblackneighbor
1 parent 29c40ad commit 3ac6a7a

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

src/components/Edit/Edit.jsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ class Edit extends PureComponent {
1616
numUsers: 0,
1717
mexSignups: 0,
1818
burnerSignups: 0,
19-
bipoclgbtqSignups: 0
19+
bipoclgbtqSignups: 0,
20+
helpyourblackneighborSignups: 0,
2021
};
2122

2223
componentDidMount = () => {
@@ -73,6 +74,18 @@ class Edit extends PureComponent {
7374
})
7475
}
7576

77+
getHelpYourBlackNeighborCount = () => {
78+
const { entriesCollection } = this.props.firebase;
79+
entriesCollection
80+
.where('group', '==', 'helpyourblackneighbor')
81+
.get()
82+
.then((querySnapshot) => {
83+
this.setState({
84+
helpyourblackneighborSignups: querySnapshot.docs.length
85+
})
86+
})
87+
}
88+
7689
handleChange = event => {
7790
this.setState({
7891
query: event.target.value
@@ -150,6 +163,7 @@ class Edit extends PureComponent {
150163
<p>There are currently {this.state.mexSignups} Mexico signups.</p>
151164
<p>There are currently {this.state.burnerSignups} Burner signups.</p>
152165
<p>There are currently {this.state.bipoclgbtqSignups} BIPOCLGBTQ signups.</p>
166+
<p>There are currently {this.state.helpyourblackneighborSignups} helpourblackneighbor signups.</p>
153167
<p>search for a user by their email.</p>
154168
<form className={styles.SearchForm} onSubmit={this.handleSearch}>
155169
<input type="text" name="query" value={this.state.query} onChange={this.handleChange} placeholder="email-goes-here@gmail.com" />

0 commit comments

Comments
 (0)