Reorganize all the navigators
This commit is contained in:
43
Views/Menu.js
Normal file
43
Views/Menu.js
Normal file
@@ -0,0 +1,43 @@
|
||||
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';
|
||||
|
||||
|
||||
let MenuView = ()=>{
|
||||
const [value, setValue] = React.useState('es');
|
||||
|
||||
React.useEffect(()=>{
|
||||
i18n.locale = value;
|
||||
Moment.updateLocale(i18n.locale);
|
||||
}, [value])
|
||||
|
||||
return (
|
||||
<View>
|
||||
<List.Section title="Settings">
|
||||
<List.Accordion
|
||||
title="User Actions"
|
||||
left={props => <List.Icon {...props} icon="person" />}
|
||||
expanded={true}
|
||||
>
|
||||
<List.Item title="Sign out" left={props => <List.Icon {...props} icon="logout" />} />
|
||||
</List.Accordion>
|
||||
<List.Item title="About" left={props => <List.Icon {...props} icon="more" />} />
|
||||
</List.Section>
|
||||
<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>
|
||||
</RadioButton.Group>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
export default MenuView;
|
||||
Reference in New Issue
Block a user