This repository was archived by the owner on Jul 22, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import React from 'react'
1+ import React , { Component } from 'react'
22import { StyleSheet , Text , View } from 'react-native'
3+ import { Button } from 'react-native-elements'
4+ import { withFirebaseHOC } from '../config/Firebase'
35
4- export default function Home ( ) {
5- return (
6- < View style = { styles . container } >
7- < Text > Home</ Text >
8- </ View >
9- )
6+ class Home extends Component {
7+ handleSignout = async ( ) => {
8+ try {
9+ await this . props . firebase . signOut ( )
10+ this . props . navigation . navigate ( 'Auth' )
11+ } catch ( error ) {
12+ console . log ( error )
13+ }
14+ }
15+ render ( ) {
16+ return (
17+ < View style = { styles . container } >
18+ < Text > Home</ Text >
19+ < Button
20+ title = 'Signout'
21+ onPress = { this . handleSignout }
22+ titleStyle = { {
23+ color : '#F57C00'
24+ } }
25+ type = 'clear'
26+ />
27+ </ View >
28+ )
29+ }
1030}
1131
1232const styles = StyleSheet . create ( {
@@ -17,3 +37,5 @@ const styles = StyleSheet.create({
1737 justifyContent : 'center'
1838 }
1939} )
40+
41+ export default withFirebaseHOC ( Home )
You can’t perform that action at this time.
0 commit comments