Skip to content

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