Skip to content
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

updated UserTable.tsx to not include duplicate usernames, including n… #21

Closed

Conversation

GeoffKellyNC
Copy link

…ames with different case. Fixes #20

This pull request adds a feature to the UserTable component that prevents duplicate usernames from being added to the table. The component now uses a Set data structure to keep track of usernames that have already been added to the table. If a user with a duplicate username is encountered, the component skips adding the user to the table.

Changes Made

  • Added a usernames Set to keep track of usernames that have already been added to the table
  • Converted all usernames to lowercase before adding them to the Set to ensure case-insensitivity
  • Skipped adding users with duplicate usernames to the table

@netlify
Copy link

netlify bot commented Sep 24, 2023

👷 Deploy request for endearing-empanada-f1c86d pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 1df47ae

@vercel
Copy link

vercel bot commented Sep 24, 2023

Someone is attempting to deploy a commit to a Personal Account owned by @maxonary on Vercel.

@maxonary first needs to authorize it.

@maxonary
Copy link
Owner

Hey Geoff, thanks for contributing! It's a neat fix, but this results in the usernames of the other game types not being shown. As a username can be entered "twice", once per game type (once for Java Edition and once for Bedrock Edition), you should also compare the game type to prevent hiding entries.

The current code results in this misbehaviour:

Bildschirmaufnahme.2023-09-24.um.14.48.36.mov

I think issue #20 lies already in the server accepting case-sensitive usernames.

@maxonary maxonary closed this Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Admin Panel - Existing Username case-sensitivity
2 participants