upd: toast alert
This commit is contained in:
@@ -65,9 +65,14 @@ export default function Search() {
|
||||
setDataDivisi([])
|
||||
setDataProject([])
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
return Toast.show({ type: 'small', text1: 'Gagal melakukan pencarian', })
|
||||
} catch (error: any) {
|
||||
console.error(error);
|
||||
const message = error?.response?.data?.message || "Gagal melakukan pencarian"
|
||||
|
||||
Toast.show({
|
||||
type: 'small',
|
||||
text1: message
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user