Profile Settings
This commit is contained in:
@@ -1,38 +1,36 @@
|
||||
import React from "react";
|
||||
import { View } from "react-native";
|
||||
import { Text, List, RadioButton } from "react-native-paper";
|
||||
import { SafeAreaView } from "react-native-safe-area-context";
|
||||
import i18n from "../i18nMessages.js";
|
||||
import Moment from 'moment';
|
||||
import 'moment/min/locales';
|
||||
Moment.locale(i18n.locale);
|
||||
|
||||
|
||||
let MenuView = ()=>{
|
||||
let MenuView = ({navigation})=>{
|
||||
const [value, setValue] = React.useState('es');
|
||||
|
||||
React.useEffect(()=>{
|
||||
i18n.locale = value;
|
||||
Moment.updateLocale(i18n.locale);
|
||||
}, [value])
|
||||
let changeLang = (locale) =>{
|
||||
i18n.locale = locale;
|
||||
Moment.locale(locale);
|
||||
setValue(locale);
|
||||
}
|
||||
|
||||
return (
|
||||
<View>
|
||||
<List.Section title="User Actions">
|
||||
<List.Item title="Profile" onPress={()=>{navigation.navigate("ProfileSettings")}} left={props => <List.Icon {...props} icon="person" />} />
|
||||
<List.Item title="Settings" left={props => <List.Icon {...props} icon="settings" />} />
|
||||
<List.Item title="Sign out" left={props => <List.Icon {...props} icon="logout" />} />
|
||||
</List.Section>
|
||||
<List.Section title="Fellowship App">
|
||||
<List.Item title="About" left={props => <List.Icon {...props} icon="more" />} />
|
||||
</List.Section>
|
||||
<View>
|
||||
<RadioButton.Group onValueChange={newValue => setValue(newValue)} value={value}>
|
||||
<View>
|
||||
<Text>Español</Text>
|
||||
<RadioButton value="es" />
|
||||
</View>
|
||||
<View>
|
||||
<Text>English</Text>
|
||||
<RadioButton value="en" />
|
||||
</View>
|
||||
<View style={{padding: 10}}>
|
||||
<Text>Lenguage:</Text>
|
||||
<RadioButton.Group onValueChange={newValue => changeLang(newValue)} value={value}>
|
||||
<RadioButton.Item value="es" label="Español"/>
|
||||
<RadioButton.Item value="en" label="English"/>
|
||||
</RadioButton.Group>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user