upd: modal konfirmasi

Deskripsi:
- menerapkan semua modal baru pada semua fitur

No Issues''
This commit is contained in:
2026-02-14 14:01:41 +08:00
parent 10212aa5de
commit 039b26f5aa
31 changed files with 718 additions and 245 deletions

View File

@@ -1,4 +1,4 @@
import AlertKonfirmasi from "@/components/alertKonfirmasi";
import ModalConfirmation from "@/components/ModalConfirmation";
import AppHeader from "@/components/AppHeader";
import { ButtonHeader } from "@/components/buttonHeader";
import ItemDetailMember from "@/components/itemDetailMember";
@@ -23,6 +23,7 @@ export default function Profile() {
const [error, setError] = useState(false)
const [preview, setPreview] = useState(false)
const [showThemeModal, setShowThemeModal] = useState(false)
const [showLogoutModal, setShowLogoutModal] = useState(false)
const ThemeOption = ({ label, value, icon }: { label: string, value: 'light' | 'dark' | 'system', icon: string }) => (
<TouchableOpacity
@@ -55,11 +56,7 @@ export default function Profile() {
<ButtonHeader
item={<AntDesign name="logout" size={20} color="white" />}
onPress={() => {
AlertKonfirmasi({
title: 'Keluar',
desc: 'Apakah anda yakin ingin keluar?',
onPress: () => { signOut() }
})
setShowLogoutModal(true)
}}
/>
}
@@ -151,6 +148,20 @@ export default function Profile() {
onRequestClose={() => setPreview(false)}
doubleTapToZoomEnabled
/>
<ModalConfirmation
visible={showLogoutModal}
title="Keluar"
message="Apakah anda yakin ingin keluar?"
onConfirm={() => {
setShowLogoutModal(false)
signOut()
}}
onCancel={() => setShowLogoutModal(false)}
confirmText="Keluar"
cancelText="Batal"
isDestructive
/>
</SafeAreaView>
)
}