upd: tampilan
Deskripsi: - masang toast - ganti tag Text No Issues
This commit is contained in:
@@ -5,7 +5,8 @@ import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { Ionicons, MaterialCommunityIcons } from "@expo/vector-icons";
|
||||
import { router, useLocalSearchParams } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Text, ToastAndroid, View } from "react-native";
|
||||
import { View } from "react-native";
|
||||
import Toast from "react-native-toast-message";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import AlertKonfirmasi from "../alertKonfirmasi";
|
||||
import DrawerBottom from "../drawerBottom";
|
||||
@@ -13,6 +14,7 @@ import ItemSectionTanggalTugas from "../itemSectionTanggalTugas";
|
||||
import MenuItemRow from "../menuItemRow";
|
||||
import ModalSelect from "../modalSelect";
|
||||
import SkeletonTask from "../skeletonTask";
|
||||
import Text from "../Text";
|
||||
|
||||
|
||||
type Props = {
|
||||
@@ -61,13 +63,13 @@ export default function SectionTanggalTugasTask() {
|
||||
}, tugas.id);
|
||||
if (response.success) {
|
||||
dispatch(setUpdateTask({ ...update, progress: !update.progress, task: !update.task }))
|
||||
ToastAndroid.show("Berhasil mengubah data", ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: 'Berhasil mengubah data', })
|
||||
} else {
|
||||
ToastAndroid.show(response.message, ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: response.message, })
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
ToastAndroid.show("Gagal mengubah data", ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: 'Gagal mengubah data', })
|
||||
} finally {
|
||||
setSelect(false)
|
||||
}
|
||||
@@ -92,13 +94,13 @@ export default function SectionTanggalTugasTask() {
|
||||
}, tugas.id);
|
||||
if (response.success) {
|
||||
dispatch(setUpdateTask({ ...update, progress: !update.progress, task: !update.task }))
|
||||
ToastAndroid.show("Berhasil menghapus data", ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: 'Berhasil menghapus data', })
|
||||
} else {
|
||||
ToastAndroid.show(response.message, ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: response.message, })
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
ToastAndroid.show("Gagal menghapus data", ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: 'Gagal menghapus data', })
|
||||
} finally {
|
||||
setModal(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user