upd: tampilan

Deskripsi:
- masang toast
- ganti tag Text

No Issues
This commit is contained in:
2025-07-29 11:41:03 +08:00
parent db98c3afc5
commit 42bf1589b4
86 changed files with 379 additions and 307 deletions

View File

@@ -14,7 +14,8 @@ import { useAuthSession } from "@/providers/AuthProvider"
import { Feather, MaterialCommunityIcons, MaterialIcons } from "@expo/vector-icons"
import { router, Stack, useLocalSearchParams } from "expo-router"
import { useEffect, useState } from "react"
import { Pressable, SafeAreaView, ScrollView, Text, ToastAndroid, View } from "react-native"
import { Pressable, SafeAreaView, ScrollView, Text, View } from "react-native"
import Toast from "react-native-toast-message"
import { useSelector } from "react-redux"
type PropsDetail = {
@@ -66,13 +67,13 @@ export default function InformationDivision() {
const response = await apiDeleteMemberDivision({ user: hasil, id: dataMemberChoose.id }, id)
if (response.success) {
setRefresh(!refresh)
ToastAndroid.show('Berhasil mengeluarkan anggota', ToastAndroid.SHORT)
Toast.show({ type: 'small', text1: 'Berhasil mengeluarkan anggota', })
} else {
ToastAndroid.show(response.message, ToastAndroid.SHORT)
Toast.show({ type: 'small', text1: response.message, })
}
} catch (error) {
console.error(error)
ToastAndroid.show('Terjadi kesalahan', ToastAndroid.SHORT)
Toast.show({ type: 'small', text1: 'Terjadi kesalahan', })
} finally {
setModal(false)
}
@@ -84,13 +85,13 @@ export default function InformationDivision() {
const response = await apiUpdateStatusAdminDivision({ user: hasil, id: dataMemberChoose.id, isAdmin: dataMemberChoose.isAdmin }, id)
if (response.success) {
setRefresh(!refresh)
ToastAndroid.show(dataMemberChoose.isAdmin ? 'Berhasil memberhentikan admin' : 'Berhasil menjadi admin', ToastAndroid.SHORT)
Toast.show({ type: 'small', text1: dataMemberChoose.isAdmin ? 'Berhasil memberhentikan admin' : 'Berhasil menjadi admin', })
} else {
ToastAndroid.show(response.message, ToastAndroid.SHORT)
Toast.show({ type: 'small', text1: response.message, })
}
} catch (error) {
console.error(error)
ToastAndroid.show('Terjadi kesalahan', ToastAndroid.SHORT)
Toast.show({ type: 'small', text1: 'Terjadi kesalahan', })
} finally {
setModal(false)
}