Small fix to show current local on settings
This commit is contained in:
@@ -9,10 +9,11 @@ import API from '../API.js';
|
||||
import { useSnapshot } from 'valtio';
|
||||
import GlobalState from '../contexts/GlobalState.js';
|
||||
import ProfileCardHorizontal from "../components/ProfileCardHorizontal.js";
|
||||
import { reloadAppAsync } from "expo";
|
||||
|
||||
|
||||
let MenuView = ({ navigation }) => {
|
||||
const [value, setValue] = React.useState('es');
|
||||
const [value, setValue] = React.useState(i18n.locale);
|
||||
const [myProfiles, setMyProfiles] = React.useState([]);
|
||||
const gState = useSnapshot(GlobalState);
|
||||
const viewer = gState.me;
|
||||
@@ -34,6 +35,8 @@ let MenuView = ({ navigation }) => {
|
||||
i18n.locale = locale;
|
||||
Moment.locale(locale);
|
||||
setValue(locale);
|
||||
//Change local on profile then reload
|
||||
//reloadAppAsync();
|
||||
}
|
||||
const profileLists = myProfiles.map((profile) => {
|
||||
const DefaultPhoto = "https://social.emmint.com/uploads/e6f9be6d665dc43417701bf16a90122c.png";
|
||||
@@ -73,19 +76,21 @@ let MenuView = ({ navigation }) => {
|
||||
{profileLists}
|
||||
</List.Accordion>
|
||||
<List.Section title="User Actions">
|
||||
<List.Item title={i18n.t('message.profile')} onPress={() => { navigation.navigate("ProfileSettings") }} left={props => <List.Icon {...props} icon="person" />} />
|
||||
<List.Item title={i18n.t('message.settings')} left={props => <List.Icon {...props} icon="settings" />} />
|
||||
<List.Item title={i18n.t('message.logout')} onPress={() => { navigation.navigate("Logout") }} left={props => <List.Icon {...props} icon="logout" />} />
|
||||
<List.Item key='ProfileEditor' title={i18n.t('message.profile')} onPress={() => { navigation.navigate("ProfileSettings") }} left={props => <List.Icon {...props} icon="person" />} />
|
||||
<List.Item key='Settings' title={i18n.t('message.settings')} left={props => <List.Icon {...props} icon="settings" />} />
|
||||
<List.Item key="Logout" title={i18n.t('message.logout')} onPress={() => { navigation.navigate("Logout") }} left={props => <List.Icon {...props} icon="logout" />} />
|
||||
</List.Section>
|
||||
<List.Section title="Fellowship App">
|
||||
<List.Item title={i18n.t('message.invite')} onPress={() => { navigation.navigate("Invite") }} left={props => <List.Icon {...props} icon="person-add" />} />
|
||||
<List.Item title={i18n.t('message.about')} left={props => <List.Icon {...props} icon="more" />} />
|
||||
<List.Item key='Invite' title={i18n.t('message.invite')} onPress={() => { navigation.navigate("Invite") }} left={props => <List.Icon {...props} icon="person-add" />} />
|
||||
<List.Item key='About' title={i18n.t('message.about')} left={props => <List.Icon {...props} icon="more" />} />
|
||||
</List.Section>
|
||||
<View style={{ padding: 10 }}>
|
||||
<Text>App Language:</Text>
|
||||
<RadioButton.Group onValueChange={newValue => changeLang(newValue)} value={value}>
|
||||
<RadioButton.Item value="es" label="Español" />
|
||||
<RadioButton.Item value="en" label="English" />
|
||||
<RadioButton.Item value="da" label="Danish" />
|
||||
<RadioButton.Item value="fr" label="French" />
|
||||
</RadioButton.Group>
|
||||
</View>
|
||||
</ImageBackground>
|
||||
|
||||
Reference in New Issue
Block a user