diff --git a/src/screens/Profile.js b/src/screens/Profile.js
index b3bf9d5..09e7c26 100644
--- a/src/screens/Profile.js
+++ b/src/screens/Profile.js
@@ -1,102 +1,109 @@
-import React from 'react';
-import { Alert, View, ScrollView, StyleSheet, TouchableOpacity } from 'react-native';
-import { Avatar, Text, useTheme, Appbar, Icon, Button, Card, List } from 'react-native-paper';
+import React, { useState } from 'react';
+import { Alert, View, ScrollView, StyleSheet, TouchableOpacity, StatusBar } from 'react-native';
+import { Avatar, Text, Appbar, List, Button, Switch, Modal, TouchableRipple } from 'react-native-paper';
import AntDesign from 'react-native-vector-icons/AntDesign';
import Ionicons from 'react-native-vector-icons/Ionicons';
import { clearAllState } from '../utils/Auth';
import { strings } from '../utils/i18n';
import person from '../assets/images/courier_man.png'
+import { colors } from '../utils/color';
const ProfileScreen = ({ navigation }) => {
- const theme = useTheme();
- const [expanded, setExpanded] = React.useState(true);
+ const [isSwitchOn, setIsSwitchOn] = React.useState(false);
- const handlePress = () => setExpanded(!expanded);
- const SettingItem = ({ title, icon, onPress }) => {
- return (
-
-
-
-
- {icon ? icon : null}
-
-
- {title ? title : null}
-
-
-
-
- )
- }
+ const onToggleSwitch = () => setIsSwitchOn(!isSwitchOn);
+
+ const [visible, setVisible] = useState(false);
- const handleLogout = () => {
- Alert.alert(
- strings('profile.signout'),
- strings('profile.signoutMessage'),
- [
- { text: strings('global.no') },
- {
- text: strings('global.yes'), onPress: () => {
- clearAllState();
- }
- }
- ]
- );
- }
+
+ const showModal = () => setVisible(true);
+ const hideModal = () => setVisible(false);
return (
-
-
- { navigation.goBack() }} />
-
-
+ <>
+
+
+
+ { navigation.goBack() }} />
+
+
-
-
-
-
- Farhan
-
-
- Land Encroachment Prevention Officer
-
+
+
+
+
+ Farhan
+
+
+ Land Encroachment Prevention Officer
+
+
-
-
-
- } left={() => } />
+
+
+ { navigation.navigate('DailyReportScreen') }}>
+ }
+ right={() => }
+ />
+
+ { navigation.navigate('PresenceScreen') }}>
+ }
+ right={() => }
+ />
+
+ { navigation.navigate('RegisterScreen') }}>
+ }
+ right={() => }
+ />
+
+ { navigation.navigate('RegisterScreen') }}>
+ }
+ right={() => }
+ />
+
+ }
+ right={() =>
+
+ {isSwitchOn ? "ID" : "EN"}
+
+
+ }
+ />
+
+
+
+
-
-
- } left={() => } />
-
-
- } left={() => } />
-
-
-
-
+
+ Konfirmasi
+ {strings('profile.signoutMessage')}
+
+
+
+ >
)
}
@@ -104,13 +111,14 @@ const styles = StyleSheet.create({
container: {
flex: 1,
marginTop: 20,
+ backgroundColor: colors.pureWhite
},
header: {
flexDirection: 'row',
alignItems: 'center',
paddingHorizontal: 10,
paddingVertical: 20,
- backgroundColor: 'white'
+ backgroundColor: colors.pureWhite
},
avatar: {
marginRight: 10,
@@ -128,16 +136,34 @@ const styles = StyleSheet.create({
},
cardView: {
marginTop: 10,
+ marginVertical: 20,
+ marginHorizontal: 10,
},
card: {
marginTop: 10,
marginHorizontal: 10,
marginVertical: 2,
- backgroundColor: 'white'
+ backgroundColor: colors.pureWhite
},
button: {
- marginTop: 20,
margin: 10,
+ borderRadius: 10,
+ color: colors.beanRed
+ },
+ modal: {
+ marginVertical: 20,
+ padding: 20,
+ marginHorizontal: 20,
+ borderRadius: 10,
+ backgroundColor: colors.pureWhite
+ },
+ switchContainer: {
+ flexDirection: "row",
+ justifyContent: "center",
+ alignItems: "center"
+ },
+ switch: {
+ marginLeft: 10
}
})