FEATURE: Allow user to delete their pending topic/post at activity page

The /activity/pending currently lists all pending topics/posts, but only posts can be deleted when entering the topic and click “Delete” button under the “waiting for approval” box, and users can’t delete their pending topics themselves without contacting a staff.

This commit add a similar “Delete” button directly to the /activity/pending page, so that users can delete their pending topics themselves, following a similar logic as the deletion of pending posts before.

Before:

After:

Also added some specs to test this function.

1 Like

Looks cool! Just as some thoughts..

  • how come the deleted topic stays in the queue like in your screenshot? shouldn’t it just.. cancel it?
  • it would make sense to me for a confirm prompt instead of making a destructive action one click