Created
March 2, 2018 07:22
-
-
Save cohawk/39e680c24cafce3be1438c41005961a6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { View } from "react-native"; | |
import { Card, Button, Text } from "react-native-elements"; | |
import { NavigationActions } from 'react-navigation'; | |
import { onSignOut } from "../auth"; | |
const resetAction = NavigationActions.reset({ | |
index: 0, | |
actions: [ | |
NavigationActions.navigate({ | |
routeName: 'SignedOut' | |
}) | |
], | |
key: null | |
}); | |
export default ({ navigation }) => ( | |
<View style={{ paddingVertical: 20 }}> | |
<Card title="John Doe"> | |
<View | |
style={{ | |
backgroundColor: "#bcbec1", | |
alignItems: "center", | |
justifyContent: "center", | |
width: 80, | |
height: 80, | |
borderRadius: 40, | |
alignSelf: "center", | |
marginBottom: 20 | |
}} | |
> | |
<Text style={{ color: "white", fontSize: 28 }}>JD</Text> | |
</View> | |
<Button | |
backgroundColor="#03A9F4" | |
title="SIGN OUT" | |
onPress={() => onSignOut().then(() => navigation.dispatch(resetAction))} | |
/> | |
</Card> | |
</View> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment