-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScreens.js
63 lines (57 loc) · 1.88 KB
/
Screens.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import React, { useState } from 'react';
import { View, Button, Text } from 'react-native';
import AuthContext from './AuthContext';
export const SingUpScreen = ({navigation}) => {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Button title="SignUp" onPress={() => alert(123)} />
<Button title="Go back" onPress={() => navigation.goBack()} />
</View>
);
};
export const ArticleList = (props) => {
const { signOut } = React.useContext(AuthContext);
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Button title="Logout" onPress={() => signOut()} />
<Button
title="Go To List"
onPress={() =>
props.navigation.navigate('ArticlesDetails', { post: '123' })
}
/>
</View>
);
};
export const ArticleDetail = ({ route, navigation }) => {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text>Article Details : {route.params?.post}</Text>
<Button title="Go back" onPress={() => navigation.goBack()} />
</View>
);
};
export const SearchScreen = (props) => {
const { signOut } = React.useContext(AuthContext);
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Button title="Logout" onPress={() => signOut()} />
</View>
);
};
export const SaveScreen = (props) => {
const { signOut } = React.useContext(AuthContext);
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Button title="Logout" onPress={() => signOut()} />
</View>
);
};
export const AccountScreen = (props) => {
const { signOut } = React.useContext(AuthContext);
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Button title="Logout" onPress={() => signOut()} />
</View>
);
};