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

@@ -1,6 +1,7 @@
import ButtonBackHeader from "@/components/buttonBackHeader";
import ButtonSaveHeader from "@/components/buttonSaveHeader";
import { InputForm } from "@/components/inputForm";
import Text from "@/components/Text";
import Styles from "@/constants/Styles";
import { apiCreateBanner, apiGetBanner } from "@/lib/api";
import { setEntities } from "@/lib/bannerSlice";
@@ -14,10 +15,9 @@ import {
Pressable,
SafeAreaView,
ScrollView,
Text,
ToastAndroid,
View,
View
} from "react-native";
import Toast from "react-native-toast-message";
import { useDispatch } from "react-redux";
export default function CreateBanner() {
@@ -76,13 +76,13 @@ export default function CreateBanner() {
const createdEntity = await apiCreateBanner(fd);
if (createdEntity.success) {
ToastAndroid.show("Berhasil menambahkan data", ToastAndroid.SHORT);
Toast.show({ type: 'small', text1: 'Berhasil menambahkan data', })
apiGetBanner({ user: hasil }).then((data) =>
dispatch(setEntities(data.data))
);
router.back();
} else {
ToastAndroid.show('Gagal menambahkan data', ToastAndroid.SHORT);
Toast.show({ type: 'small', text1: 'Gagal menambahkan data', })
}
};