From 0bad792ce86cbe25812bfd7536c9ef7d6c751688 Mon Sep 17 00:00:00 2001 From: amaliadwiy Date: Wed, 22 Apr 2026 16:42:59 +0800 Subject: [PATCH] feat: tambah pengecekan villageIsActive saat desa dinonaktifkan Co-Authored-By: Claude Sonnet 4.6 --- app/(application)/home.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) 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