upd: tampilan
Deskripsi: - masang toast - ganti tag Text No Issues
This commit is contained in:
@@ -12,7 +12,8 @@ import { useAuthSession } from "@/providers/AuthProvider"
|
||||
import { Stack, router, useLocalSearchParams } from "expo-router"
|
||||
import moment from "moment"
|
||||
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 EditEventCalendar() {
|
||||
const { token, decryptToken } = useAuthSession();
|
||||
@@ -53,7 +54,7 @@ export default function EditEventCalendar() {
|
||||
setChoose({ val: response.data.repeatEventTyper, label: valueTypeEventRepeat.find((item) => item.id == response.data.repeatEventTyper)?.name || "" })
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
ToastAndroid.show('Gagal mendapatkan data', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Gagal mendapatkan data', })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,13 +144,13 @@ export default function EditEventCalendar() {
|
||||
const response = await apiUpdateCalendar({ data: { ...data, user: hasil }, id: idCalendar })
|
||||
if (response.success) {
|
||||
router.replace(`/division/${id}/calendar/`)
|
||||
ToastAndroid.show('Berhasil mengubah acara', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Berhasil mengubah acara', })
|
||||
} else {
|
||||
ToastAndroid.show(response.message, ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: response.message, })
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ToastAndroid.show('Gagal mengubah acara', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Gagal mengubah acara', })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user