upd: toast alert
This commit is contained in:
@@ -44,8 +44,11 @@ export default function HeaderRightProjectDetail({ id, status }: Props) {
|
||||
} else {
|
||||
Toast.show({ type: 'small', text1: 'Gagal menghapus kegiatan', })
|
||||
}
|
||||
} catch (error) {
|
||||
} catch (error :any ) {
|
||||
console.error(error)
|
||||
const message = error?.response?.data?.message || "Gagal menghapus kegiatan"
|
||||
|
||||
Toast.show({ type: 'small', text1: message })
|
||||
} finally {
|
||||
setVisible(false)
|
||||
}
|
||||
@@ -61,8 +64,11 @@ export default function HeaderRightProjectDetail({ id, status }: Props) {
|
||||
} else {
|
||||
Toast.show({ type: 'small', text1: 'Gagal menambahkan link', })
|
||||
}
|
||||
} catch (error) {
|
||||
} catch (error :any ) {
|
||||
console.error(error)
|
||||
const message = error?.response?.data?.message || "Gagal menambahkan link"
|
||||
|
||||
Toast.show({ type: 'small', text1: message })
|
||||
} finally {
|
||||
setAddLink(false)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user