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

@@ -39,10 +39,10 @@ import {
RefreshControl,
SafeAreaView,
ScrollView,
ToastAndroid,
View,
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";
type Props = {
@@ -207,15 +207,15 @@ export default function DocumentDivision() {
const hasil = await decryptToken(String(token?.current));
const response = await apiDocumentRename({ user: hasil, ...bodyRename });
if (response.success) {
ToastAndroid.show("Berhasil mengubah nama", ToastAndroid.SHORT);
Toast.show({ type: 'small', text1: 'Berhasil mengubah nama', })
dispatch(setUpdateDokumen(!update));
handleBatal();
} 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 {
setRename(false);
}
@@ -229,15 +229,15 @@ export default function DocumentDivision() {
data: selectedFiles,
});
if (response.success) {
ToastAndroid.show("Berhasil menghapus", ToastAndroid.SHORT);
Toast.show({ type: 'small', text1: 'Berhasil menghapus', })
dispatch(setUpdateDokumen(!update));
handleBatal();
} 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', })
}
}
@@ -254,15 +254,15 @@ export default function DocumentDivision() {
dataItem: selectedFiles,
});
if (response.success) {
ToastAndroid.show("Berhasil membagikan item", ToastAndroid.SHORT);
Toast.show({ type: 'small', text1: 'Berhasil membagikan item', })
dispatch(setUpdateDokumen(!update));
handleBatal();
} 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 {
setShare(false);
}