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

@@ -7,7 +7,8 @@ import { setUpdateTask } from "@/lib/taskUpdate";
import { useAuthSession } from "@/providers/AuthProvider";
import { router, Stack, useLocalSearchParams } from "expo-router";
import { useEffect, useState } from "react";
import { SafeAreaView, ScrollView, ToastAndroid, View } from "react-native";
import { SafeAreaView, ScrollView, View } from "react-native";
import Toast from "react-native-toast-message";
import { useDispatch, useSelector } from "react-redux";
export default function TaskDivisionEdit() {
@@ -41,7 +42,7 @@ export default function TaskDivisionEdit() {
setJudul(val);
if (val == "" || val == "null") {
setError(true);
}else{
} else {
setError(false);
}
}
@@ -70,14 +71,14 @@ export default function TaskDivisionEdit() {
);
if (response.success) {
dispatch(setUpdateTask({ ...update, data: !update.data }));
ToastAndroid.show("Berhasil mengubah data", ToastAndroid.SHORT);
Toast.show({ type: 'small', text1: 'Berhasil mengubah data', })
router.back();
} 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', })
}
}