mirror of
https://github.com/balzack/databag.git
synced 2025-04-24 10:35:23 +00:00
show logout only in tab view
This commit is contained in:
parent
836dbb6552
commit
8bcae56fe1
@ -16,7 +16,7 @@ import {createDrawerNavigator} from '@react-navigation/drawer';
|
||||
|
||||
const ChannelsRoute = () => <Channels />;
|
||||
const ContactsRoute = () => <Contacts />;
|
||||
const SettingsRoute = () => <Settings />;
|
||||
const SettingsRoute = () => <Settings showLogout={true} />;
|
||||
|
||||
const SettingsDrawer = createDrawerNavigator();
|
||||
const ContactsDrawer = createDrawerNavigator();
|
||||
|
@ -206,6 +206,7 @@ export const styles = StyleSheet.create({
|
||||
},
|
||||
radioControl: {
|
||||
flexGrow: 1,
|
||||
flexShrink: 1,
|
||||
},
|
||||
radioButtons: {
|
||||
display: 'flex',
|
||||
|
@ -7,7 +7,7 @@ import ImagePicker from 'react-native-image-crop-picker';
|
||||
import {BlurView} from '@react-native-community/blur';
|
||||
import {KeyboardAwareScrollView} from 'react-native-keyboard-aware-scroll-view';
|
||||
|
||||
export function Settings() {
|
||||
export function Settings({ showLogout }: { showLogout: boolean }) {
|
||||
const { state, actions } = useSettings();
|
||||
const [alert, setAlert] = useState(false);
|
||||
const [details, setDetails] = useState(false);
|
||||
@ -207,17 +207,19 @@ export function Settings() {
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</View>
|
||||
{ showLogout && (
|
||||
<View style={styles.attribute}>
|
||||
<View style={styles.controlIcon}>
|
||||
<Icon size={24} source="logout" />
|
||||
</View>
|
||||
<View style={styles.control}>
|
||||
<TouchableOpacity activeOpacity={1} onPress={() => manageSeal}>
|
||||
<Text style={styles.controlLabel}>{state.strings.logout}</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</View>
|
||||
)}
|
||||
<View style={styles.attribute}>
|
||||
<View style={styles.controlIcon}>
|
||||
<Icon size={24} source="logout" />
|
||||
</View>
|
||||
<View style={styles.control}>
|
||||
<TouchableOpacity activeOpacity={1} onPress={() => manageSeal}>
|
||||
<Text style={styles.controlLabel}>{state.strings.logout}</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</View>
|
||||
<View style={styles.attribute}>
|
||||
<View style={styles.controlIcon}>
|
||||
<Icon size={24} source="account-remove" />
|
||||
</View>
|
||||
|
Loading…
x
Reference in New Issue
Block a user