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

Add Admin Panel UI for account deletion #5716

Merged
merged 1 commit into from
Nov 21, 2022
Merged

Conversation

brianpeiris
Copy link
Contributor

@brianpeiris brianpeiris commented Sep 15, 2022

Adds a delete button to the account edit screen in the admin panel. Includes a confirmation dialog and states. Also removes the bulk delete capability from the account list.

Goes with Hubs-Foundation/reticulum#628

@bryanenders
Copy link
Contributor

Rebased

@bryanenders bryanenders temporarily deployed to hc-bio November 15, 2022 13:42 Inactive
@bryanenders bryanenders temporarily deployed to hc-bio November 16, 2022 16:49 Inactive
</Button>
)}

{deleteState === deleteStates.confirming && (
Copy link
Contributor

@nickgrato nickgrato Nov 18, 2022

Choose a reason for hiding this comment

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

might be nice to add a new function like this

 /**
   * compare state
   * @return boolean
   */
  const isDeleteState = useCallback(
    state => {
      return state === deleteState;
    },
    [deleteState]
  );

and then refactor ones like this to..

{isDeleteState(Confirming) && (

Copy link
Contributor

@nickgrato nickgrato left a comment

Choose a reason for hiding this comment

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

Nothing here is a blocker - feel free to take any of the changes suggested but I don't see any errors,

@bryanenders bryanenders temporarily deployed to hc-bio November 21, 2022 16:07 Inactive
@bryanenders bryanenders temporarily deployed to hc-bio November 21, 2022 16:17 Inactive
@bryanenders bryanenders temporarily deployed to hc-bio November 21, 2022 16:52 Inactive
@bryanenders
Copy link
Contributor

Squashed

@bryanenders bryanenders merged commit 62178f4 into master Nov 21, 2022
@bryanenders bryanenders deleted the feature/account-deletion branch November 21, 2022 17:01
@bryanenders bryanenders temporarily deployed to hc-bio November 21, 2022 17:04 Inactive
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.

None yet

3 participants