upd: tampilan
Deskripsi: - masang toast - ganti tag Text No Issues
This commit is contained in:
@@ -8,8 +8,9 @@ import { startActivityAsync } from 'expo-intent-launcher';
|
||||
import { useLocalSearchParams } from "expo-router";
|
||||
import * as Sharing from 'expo-sharing';
|
||||
import { useEffect, useState } from "react";
|
||||
import { Alert, Platform, Text, ToastAndroid, View } from "react-native";
|
||||
import { Alert, Platform, View } from "react-native";
|
||||
import * as mime from 'react-native-mime-types';
|
||||
import Toast from "react-native-toast-message";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import AlertKonfirmasi from "../alertKonfirmasi";
|
||||
import BorderBottomItem from "../borderBottomItem";
|
||||
@@ -17,6 +18,7 @@ import DrawerBottom from "../drawerBottom";
|
||||
import MenuItemRow from "../menuItemRow";
|
||||
import ModalLoading from "../modalLoading";
|
||||
import Skeleton from "../skeleton";
|
||||
import Text from "../Text";
|
||||
|
||||
type Props = {
|
||||
id: string
|
||||
@@ -99,14 +101,14 @@ export default function SectionFileTask() {
|
||||
const hasil = await decryptToken(String(token?.current));
|
||||
const response = await apiDeleteFileTask({ user: hasil }, String(selectFile?.id));
|
||||
if (response.success) {
|
||||
ToastAndroid.show('Berhasil menghapus file', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Berhasil menghapus file', })
|
||||
dispatch(setUpdateTask({ ...update, file: !update.file }))
|
||||
} 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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user