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

@@ -4,6 +4,7 @@ import ButtonSaveHeader from "@/components/buttonSaveHeader";
import ButtonSelect from "@/components/buttonSelect";
import DrawerBottom from "@/components/drawerBottom";
import MenuItemRow from "@/components/menuItemRow";
import Text from "@/components/Text";
import Styles from "@/constants/Styles";
import { apiAddFileTask, apiCheckFileTask } from "@/lib/api";
import { setUpdateTask } from "@/lib/taskUpdate";
@@ -16,10 +17,9 @@ import {
ActivityIndicator,
SafeAreaView,
ScrollView,
Text,
ToastAndroid,
View,
View
} from "react-native";
import Toast from "react-native-toast-message";
import { useDispatch, useSelector } from "react-redux";
export default function TaskDivisionAddFile() {
@@ -45,7 +45,7 @@ export default function TaskDivisionAddFile() {
setFileForm([...fileForm, result.assets?.[0]]);
setListFile([...listFile, result.assets?.[0].name]);
} else {
ToastAndroid.show("File sudah ada", ToastAndroid.SHORT);
Toast.show({ type: 'small', text1: 'File sudah ada', })
}
}
}
@@ -108,15 +108,15 @@ export default function TaskDivisionAddFile() {
const response = await apiAddFileTask({ data: fd, id: detail });
if (response.success) {
ToastAndroid.show("Berhasil menambahkan file", ToastAndroid.SHORT);
Toast.show({ type: 'small', text1: 'Berhasil menambahkan file', })
dispatch(setUpdateTask({ ...update, file: !update.file }));
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', })
}
}