Browse Source

Merge branch 'main' of https://github.com/IGSD-UoW/WPD-MobileApp into main

master
analuizaff 4 years ago
parent
commit
de107e7502
  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>
<EventLocationProvider>
<NavigationContainer theme={navigationTheme}>
{user !== undefined ? <AppNavigator /> : <AuthNavigator />}
{user ? <AppNavigator /> : <AuthNavigator />}
<FlashMessage position="top" />
</NavigationContainer>
</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 InDevelopment from "../components/InDevelopment";
import { AuthContext } from "../auth/context";
function AccountScreen(props) {
const { user, setUser } = useContext(AuthContext);
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>
);
}

Loading…
Cancel
Save