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

Added functionality of blocking/deleting users #239

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Shengle-Dai
Copy link
Collaborator

Summary

This PR allows administrators to delete/ban users on the admin page.

  • Added the new button svgs and fully functioning buttons to the HTML
  • Added banUser socket to ServerData.tsx

Test Plan

Tested on local device:
Clipboard Dec 8, 2024 at 10 16 PM

@dti-github-bot
Copy link
Member

[diff-counting] Significant lines: 96.

if (
window.confirm("Are you sure you want to delete this user?")
) {
setRowsData((prevRows: any[]) =>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing job implementing the blocking feature! One thing I would consider is using a map for the row data (such as prevRows) instead of an array to optimize updates for larger datasets. This could allow for constant-time lookups and updates.

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.

3 participants