Skip to content

Commit

Permalink
fix: update route name when delete status (elk-zone#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
zyyv authored Nov 27, 2022
1 parent 77a87af commit 2bf4f89
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/status/StatusActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,15 @@ const copyLink = async () => {
}
const deleteStatus = async () => {
// TODO confirm to delete
if (process.dev) {
const result = confirm('[DEV] Are you sure you want to delete this post?')
if (!result)
return
}
await useMasto().statuses.remove(status.id)
if (route.name === '@user-post')
if (route.name === '@account-status')
router.back()
// TODO when timeline, remove this item
Expand Down

0 comments on commit 2bf4f89

Please sign in to comment.