feat: tambah pengecekan villageIsActive saat desa dinonaktifkan

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-22 16:42:59 +08:00
parent 6c9623954c
commit 0bad792ce8

View File

@@ -65,6 +65,16 @@ export default function Home() {
}
}, [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 () => {
setRefreshing(true)
// Invalidate all queries related to the home screen