Browse Source

Adding dummy account screen

master
GabrielTrettel 4 years ago
parent
commit
59e11d4385
  1. 2
      src/App.js
  2. 22
      src/app/screens/AccountScreen.js

2
src/App.js

@ -27,7 +27,7 @@ export default function App() {
<CurrentLocationProvider> <CurrentLocationProvider>
<EventLocationProvider> <EventLocationProvider>
<NavigationContainer theme={navigationTheme}> <NavigationContainer theme={navigationTheme}>
{user !== undefined ? <AppNavigator /> : <AuthNavigator />}
{user ? <AppNavigator /> : <AuthNavigator />}
<FlashMessage position="top" /> <FlashMessage position="top" />
</NavigationContainer> </NavigationContainer>
</EventLocationProvider> </EventLocationProvider>

22
src/app/screens/AccountScreen.js

@ -1,11 +1,27 @@
import React from "react";
import React, { useContext } from "react";
import { Text, Button } from "react-native";
import Screen from "../components/Screen"; import Screen from "../components/Screen";
import InDevelopment from "../components/InDevelopment"; import InDevelopment from "../components/InDevelopment";
import { AuthContext } from "../auth/context";
function AccountScreen(props) { function AccountScreen(props) {
const { user, setUser } = useContext(AuthContext);
return ( return (
<Screen>
<InDevelopment />
<Screen
style={{
padding: 10,
}}
>
<Text>{user.name}</Text>
<Text>{user.email}</Text>
<Button
style={{ paddingTop: 10 }}
title="Logout"
onPress={() => setUser(null)}
/>
{/* <InDevelopment /> */}
</Screen> </Screen>
); );
} }

Loading…
Cancel
Save