diff --git a/app/(application)/home.tsx b/app/(application)/home.tsx index 0b0a95f..7da9162 100644 --- a/app/(application)/home.tsx +++ b/app/(application)/home.tsx @@ -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