From 802222fe7181303d710607129e1c74427f07c97c Mon Sep 17 00:00:00 2001
From: Paul Frazee <pfrazee@gmail.com>
Date: Thu, 9 Jun 2022 17:13:29 -0500
Subject: Add auth navigations

---
 src/screens/Home.tsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'src/screens/Home.tsx')

diff --git a/src/screens/Home.tsx b/src/screens/Home.tsx
index f4b8ffb63..a2d013abe 100644
--- a/src/screens/Home.tsx
+++ b/src/screens/Home.tsx
@@ -1,8 +1,10 @@
 import React from 'react'
 import {Text, Button, View, SafeAreaView} from 'react-native'
 import type {PrimaryTabScreenProps} from '../routes/types'
+import {useStores} from '../state'
 
-export const Home = ({navigation}: PrimaryTabScreenProps<'Home'>) => {
+export function Home({navigation}: PrimaryTabScreenProps<'Home'>) {
+  const store = useStores()
   return (
     <SafeAreaView style={{flex: 1}}>
       <View style={{flex: 1}}>
@@ -11,6 +13,7 @@ export const Home = ({navigation}: PrimaryTabScreenProps<'Home'>) => {
           title="Go to Jane's profile"
           onPress={() => navigation.navigate('Profile', {name: 'Jane'})}
         />
+        <Button title="Logout" onPress={() => store.session.setAuthed(false)} />
       </View>
     </SafeAreaView>
   )
-- 
cgit 1.4.1

