upd: toast alert

This commit is contained in:
2026-02-24 17:44:49 +08:00
parent 214a243e44
commit 8c6ff06216
67 changed files with 384 additions and 187 deletions

View File

@@ -147,9 +147,11 @@ export default function EditAnnouncement() {
} else {
Toast.show({ type: 'small', text1: 'Gagal mengubah data', })
}
} catch (error) {
} catch (error: any) {
console.error(error);
Toast.show({ type: 'small', text1: 'Gagal mengubah data', })
const message = error?.response?.data?.message || "Gagal mengubah data"
Toast.show({ type: 'small', text1: message })
} finally {
setLoading(false)
}
@@ -309,7 +311,7 @@ export default function EditAnnouncement() {
<View style={[Styles.rowSpaceBetween, Styles.mv05]}>
<Text style={[Styles.textDefaultSemiBold]}>Divisi</Text>
</View>
<View style={[Styles.borderAll, Styles.round05, Styles.p10, {backgroundColor: colors.card, borderColor: colors.icon + '20' }]}>
<View style={[Styles.borderAll, Styles.round05, Styles.p10, { backgroundColor: colors.card, borderColor: colors.icon + '20' }]}>
{
dataMember.map((item: { name: any; Division: any }, index: any) => {
return (