Skip to content

Instantly share code, notes, and snippets.

@cohawk
Created March 2, 2018 07:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cohawk/39e680c24cafce3be1438c41005961a6 to your computer and use it in GitHub Desktop.
Save cohawk/39e680c24cafce3be1438c41005961a6 to your computer and use it in GitHub Desktop.
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