feat: tambah pengecekan villageIsActive saat desa dinonaktifkan
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -65,6 +65,16 @@ export default function Home() {
|
|||||||
}
|
}
|
||||||
}, [profile, signOut])
|
}, [profile, signOut])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (profile && profile.villageIsActive === false) {
|
||||||
|
Alert.alert(
|
||||||
|
'Desa Dinonaktifkan',
|
||||||
|
'Desa kamu saat ini telah dinonaktifkan. Silahkan hubungi pengelola sistem untuk informasi lebih lanjut.',
|
||||||
|
[{ text: 'OK', onPress: signOut }]
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}, [profile, signOut])
|
||||||
|
|
||||||
const handleRefresh = async () => {
|
const handleRefresh = async () => {
|
||||||
setRefreshing(true)
|
setRefreshing(true)
|
||||||
// Invalidate all queries related to the home screen
|
// Invalidate all queries related to the home screen
|
||||||
|
|||||||
Reference in New Issue
Block a user