-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Registration stat tix #473
base: dev
Are you sure you want to change the base?
Conversation
Visit the preview URL for this PR (updated for commit 085de38): https://bt-web-dev-ebf17--pr473-registrationstattix-bs8eaxj7.web.app (expires Thu, 05 Oct 2023 21:20:08 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: a1bf7afe94c954469059b9e3898cf94f4178c379 |
@@ -272,6 +272,9 @@ export class EventStatsTable extends Component { | |||
registrationNumbers(users) { | |||
const registrationNumbers = { | |||
}; | |||
for (let i = 0; i < users.length; i++) { | |||
users = users.filter(user => user.isPartner === false); | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be rewritten the same if you remove the for loop. Notice how you are not using "i" in line 276. See the documentation for array.filter to see how filter operates on the entire array and not just a single item.
@@ -9335,9 +9335,9 @@ | |||
"optional": true | |||
}, | |||
"node_modules/@types/react": { | |||
"version": "18.2.9", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package-lock shouldn't have changed here because you didn't add any new dependencies. I think you need to rebase the branch onto the latest version of dev, making sure to git pull.
Please try to make it so there are no changes to package lock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work on making your first PR! To more clearly match the ticket description, instead of filtering, I think the best way to approach it is to have a separate stat tab for partners, so we can still see how many partners are registered
🎟️ Ticket(s): Closes # Add Partner Count to registration state
👷 Changes: The ticket was slightly modified. The stats show just the participant stats and no partner stats instead of showing the number of partners and participants separately.
Wait! Before you merge, have you checked the following:
📷 Screenshots
Total number of participants were 8 and number of partners were 4.
The total on the stat is 8, showing just the participants.
Checklist