upd: redesign
This commit is contained in:
@@ -31,15 +31,14 @@ export default function HeaderRightAnnouncementDetail({ id }: Props) {
|
||||
const hasil = await decryptToken(String(token?.current))
|
||||
const response = await apiDeleteAnnouncement({ user: hasil }, id)
|
||||
if (response.success) {
|
||||
dispatch(setUpdateAnnouncement(!update))
|
||||
setVisible(false)
|
||||
Toast.show({ type: 'small', text1: 'Berhasil menghapus data', })
|
||||
router.back()
|
||||
dispatch(setUpdateAnnouncement(!update))
|
||||
return Toast.show({ type: 'small', text1: 'Berhasil menghapus data', })
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
} finally {
|
||||
setVisible(false)
|
||||
setShowDeleteModal(false)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user