import React from "react"; import { View, Text, Image, TouchableOpacity, StyleSheet, Alert, } from "react-native"; import { Ionicons } from "@expo/vector-icons"; import { useNavigation } from "@react-navigation/native"; import BottomTabAdmin from "../../Navigation/BottomTabAdmin"; const ProfilAdminScreen = () => { const navigation = useNavigation(); const userProfile = { name: "Johan Okta Pangestu", email: "okta@gmail.com", phone: "08123456789", address: "Jl. Raya No. 123, Nganjuk", joinDate: "January 15, 2023", }; const handleLogout = () => { Alert.alert( "Konfirmasi Keluar", "Apakah Anda yakin ingin keluar dari aplikasi?", [ { text: "Tidak", onPress: () => console.log("Logout cancelled"), style: "cancel", }, { text: "Yakin", onPress: () => { console.log("User logged out"); navigation.navigate("AksesAkun"); // Navigasi ke halaman masuk admin }, }, ], { cancelable: false } ); }; return ( {/* Profile Section */} navigation.navigate("EditProfilScreen")} > Edit Profil Hi, {userProfile.name} Keberihan lingkungan sekitar anda wajib terjaga DINAS LINGKUNGAN HIDUP {/* Profile Information Section */} Nama: {userProfile.name} Email: {userProfile.email} No. HP: {userProfile.phone} Alamat: {userProfile.address} Tanggal Bergabung: {userProfile.joinDate} {/* Logout Button */} KELUAR AKUN {/* Bottom Navigation */} navigation.navigate("AksesAkun")} > UTAMA navigation.navigate("NotifikasiAdminScreen")} > 1 NOTIFIKASI navigation.navigate("ProfilAdminScreen")} > PROFIL ); }; const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: "#fff", }, profileSection: { alignItems: "center", padding: 20, backgroundColor: "#fff", borderBottomWidth: 1, borderBottomColor: "#ddd", marginTop: 30, }, profileImage: { width: 150, height: 150, borderRadius: 75, marginBottom: 20, }, profileTextContainer: { alignItems: "center", justifyContent: "center", }, greetingText: { fontSize: 30, fontWeight: "bold", color: "#333", }, envMessageText: { fontSize: 14, color: "#555", marginVertical: 5, }, dinasBox: { backgroundColor: "#ddd", paddingVertical: 3, paddingHorizontal: 12, marginTop: 1, borderRadius: 8, borderColor: "#000", alignItems: "center", borderWidth: 0.5, }, dinasText: { fontSize: 12, fontWeight: "bold", color: "#333", }, editButton: { backgroundColor: "#fff", paddingVertical: 5, borderRadius: 8, alignItems: "center", marginTop: 10, paddingHorizontal: 30, marginBottom: 5, borderWidth: 1, borderColor: "#000", }, editButtonText: { fontSize: 16, color: "#000", fontWeight: "bold", }, infoSection: { paddingHorizontal: 20, marginBottom: 20, }, infoLabel: { fontSize: 14, fontWeight: "bold", color: "#555", marginTop: 10, }, infoText: { fontSize: 16, color: "#777", marginBottom: 15, }, logoutButton: { backgroundColor: "#fff", paddingVertical: 12, borderRadius: 8, alignItems: "center", marginHorizontal: 20, marginBottom: 20, borderWidth: 0.5, elevation: 1, }, logoutButtonText: { fontSize: 16, color: "#000", fontWeight: "bold", }, bottomNav: { position: "absolute", bottom: 0, width: "100%", flexDirection: "row", justifyContent: "space-evenly", backgroundColor: "#fff", paddingVertical: 8, borderTopLeftRadius: 20, borderTopRightRadius: 20, shadowColor: "#000", shadowOffset: { width: 0, height: -2 }, shadowOpacity: 0.1, shadowRadius: 6, elevation: 5, }, navItem: { alignItems: "center", padding: 6, borderRadius: 10, paddingHorizontal: 12, paddingVertical: 5, marginHorizontal: 5, }, navText: { color: "#2C6B2F", fontSize: 12, marginTop: 5 }, notifIconContainer: { position: "relative" }, badge: { position: "absolute", right: -5, top: -5, backgroundColor: "#E74C3C", borderRadius: 10, paddingHorizontal: 6, paddingVertical: 2, }, badgeText: { color: "#fff", fontSize: 10, fontWeight: "bold" }, }); export default ProfilAdminScreen;