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

@@ -3,6 +3,7 @@ import ButtonSaveHeader from "@/components/buttonSaveHeader";
import { InputForm } from "@/components/inputForm";
import ModalSelect from "@/components/modalSelect";
import SelectForm from "@/components/selectForm";
import Text from "@/components/Text";
import Styles from "@/constants/Styles";
import { apiEditProfile, apiGetProfile } from "@/lib/api";
import { setEntities } from "@/lib/entitiesSlice";
@@ -15,10 +16,9 @@ import {
Pressable,
SafeAreaView,
ScrollView,
Text,
ToastAndroid,
View,
View
} from "react-native";
import Toast from "react-native-toast-message";
import { useDispatch, useSelector } from "react-redux";
type Props = {
@@ -170,15 +170,15 @@ export default function EditProfile() {
const response = await apiEditProfile(fd)
if (response.success) {
ToastAndroid.show('Berhasil mengupdate data', ToastAndroid.SHORT)
Toast.show({ type: 'small', text1: 'Berhasil mengupdate data', })
await handleLoad()
router.back()
} else {
ToastAndroid.show(response.message, ToastAndroid.SHORT)
Toast.show({ type: 'small', text1: response.message, })
}
} catch (error) {
console.error(error)
ToastAndroid.show('Gagal mengupdate data', ToastAndroid.SHORT)
Toast.show({ type: 'small', text1: 'Gagal mengupdate data', })
}
}