upd: tampilan
Deskripsi: - masang toast - ganti tag Text No Issues
This commit is contained in:
@@ -10,7 +10,8 @@ import { useAuthSession } from "@/providers/AuthProvider"
|
||||
import dayjs from "dayjs"
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router"
|
||||
import { useEffect, useState } from "react"
|
||||
import { SafeAreaView, ScrollView, ToastAndroid, View } from "react-native"
|
||||
import { SafeAreaView, ScrollView, View } from "react-native"
|
||||
import Toast from "react-native-toast-message"
|
||||
|
||||
export default function ReportDivision() {
|
||||
const { id } = useLocalSearchParams<{ id: string }>()
|
||||
@@ -31,7 +32,7 @@ export default function ReportDivision() {
|
||||
dateEnd: false,
|
||||
});
|
||||
|
||||
function validationForm( cat: "date" | "dateEnd", val: string) {
|
||||
function validationForm(cat: "date" | "dateEnd", val: string) {
|
||||
if (cat == "date") {
|
||||
setData({ ...data, date: val, dateEnd: "" });
|
||||
if (val == "" || val == "null") {
|
||||
@@ -89,7 +90,7 @@ export default function ReportDivision() {
|
||||
})
|
||||
setShowReport(true);
|
||||
} else {
|
||||
ToastAndroid.show(response.message, ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: response.message, });
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
Reference in New Issue
Block a user