fix: update route name when delete status (#151)

This commit is contained in:
Chris 2022-11-27 13:08:13 +08:00 committed by GitHub
parent 77a87af46a
commit 2bf4f8913a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,9 +79,15 @@ const copyLink = async () => {
} }
const deleteStatus = async () => { const deleteStatus = async () => {
// TODO confirm to delete // 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) await useMasto().statuses.remove(status.id)
if (route.name === '@user-post')
if (route.name === '@account-status')
router.back() router.back()
// TODO when timeline, remove this item // TODO when timeline, remove this item