Skip to content

Commit 1f9deaa

Browse files
committed
Changed the Mail Page
1 parent a674213 commit 1f9deaa

File tree

7 files changed

+330
-354
lines changed

7 files changed

+330
-354
lines changed

App.tsx

Lines changed: 62 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,68 @@
1-
2-
import {createNativeStackNavigator} from "@react-navigation/native-stack";
3-
import {createNavigationContainerRef, NavigationContainer} from "@react-navigation/native";
4-
import {HomePage} from "./Screens/HomePage";
5-
import ContextState from "./Context/ContextState";
6-
import {ChatPage} from "./Screens/ChatPage";
7-
import {MailPage} from "./Screens/MailPage";
8-
import {CodePage} from "./Screens/CodePage";
9-
import {ToastProvider} from "react-native-toast-notifications";
10-
import {HistoryChatPage} from "./Screens/HistoryChatPage";
11-
import {OnboardingScreen} from "./Screens/OnboardingScreen";
12-
import {useEffect, useState} from "react";
13-
import AsyncStorage from "@react-native-async-storage/async-storage";
14-
import {Initial} from "./Screens/Initial";
15-
1+
/* eslint-disable react/react-in-jsx-scope */
2+
import {createNativeStackNavigator} from '@react-navigation/native-stack';
3+
import {NavigationContainer} from '@react-navigation/native';
4+
import {HomePage} from './Screens/HomePage';
5+
import ContextState from './Context/ContextState';
6+
import {ChatPage} from './Screens/ChatPage';
7+
import {MailPage} from './Screens/MailPage';
8+
import {CodePage} from './Screens/CodePage';
9+
import {ToastProvider} from 'react-native-toast-notifications';
10+
import {OnboardingScreen} from './Screens/OnboardingScreen';
11+
import {Initial} from './Screens/Initial';
1612

1713
function App(): JSX.Element {
18-
const Stack = createNativeStackNavigator()
19-
return (<ToastProvider>
14+
const Stack = createNativeStackNavigator();
15+
return (
16+
<ToastProvider>
2017
<ContextState>
21-
<NavigationContainer >
22-
<Stack.Navigator initialRouteName={'Initial'}>
23-
<Stack.Screen name={"Initial"} component={Initial} options={{
24-
headerShown:false
25-
}}/>
26-
<Stack.Screen name={"Onboarding"} component={OnboardingScreen} options={{
27-
headerShown:false
28-
}}/>
29-
<Stack.Screen name={"HomePage"} component={HomePage} options={{
30-
headerShown:false
31-
}}/>
32-
<Stack.Screen name={"ChatPage"} component={ChatPage} options={{
33-
headerShown:false
34-
}}/>
35-
<Stack.Screen name={"MailPage"} component={MailPage} options={{
36-
headerShown:false
37-
}}/>
38-
<Stack.Screen name={"CodePage"} component={CodePage} options={{
39-
headerShown:false
40-
}}/>
41-
</Stack.Navigator>
42-
</NavigationContainer>
43-
</ContextState></ToastProvider>
18+
<NavigationContainer>
19+
<Stack.Navigator initialRouteName={'Initial'}>
20+
<Stack.Screen
21+
name={'Initial'}
22+
component={Initial}
23+
options={{
24+
headerShown: false,
25+
}}
26+
/>
27+
<Stack.Screen
28+
name={'Onboarding'}
29+
component={OnboardingScreen}
30+
options={{
31+
headerShown: false,
32+
}}
33+
/>
34+
<Stack.Screen
35+
name={'HomePage'}
36+
component={HomePage}
37+
options={{
38+
headerShown: false,
39+
}}
40+
/>
41+
<Stack.Screen
42+
name={'ChatPage'}
43+
component={ChatPage}
44+
options={{
45+
headerShown: false,
46+
}}
47+
/>
48+
<Stack.Screen
49+
name={'MailPage'}
50+
component={MailPage}
51+
options={{
52+
headerShown: false,
53+
}}
54+
/>
55+
<Stack.Screen
56+
name={'CodePage'}
57+
component={CodePage}
58+
options={{
59+
headerShown: false,
60+
}}
61+
/>
62+
</Stack.Navigator>
63+
</NavigationContainer>
64+
</ContextState>
65+
</ToastProvider>
4466
);
4567
}
4668

Components/Homepage/EachFeaturesCard.js

Lines changed: 0 additions & 39 deletions
This file was deleted.

Components/Homepage/EachHistory.js

Lines changed: 0 additions & 45 deletions
This file was deleted.

Components/Homepage/EachHistorycard.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* eslint-disable react-native/no-inline-styles */
2-
import {View, Text, TouchableOpacity, Dimensions} from 'react-native';
2+
import {Text, TouchableOpacity, Dimensions} from 'react-native';
33
import React, {memo} from 'react';
44
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome';
5-
import {faPaperPlane, faTrash} from '@fortawesome/free-solid-svg-icons';
5+
import {faTrash} from '@fortawesome/free-solid-svg-icons';
66

77
function EachHistorycard({navigation, item, index, deleteData}) {
88
function getFormattedData(text) {

Components/Homepage/TopPart.js

Lines changed: 0 additions & 29 deletions
This file was deleted.

Screens/HomePage.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
TextInput,
99
Image,
1010
} from 'react-native';
11-
import React, {useCallback, useContext} from 'react';
11+
import React, {useContext} from 'react';
1212
import Context from '../Context/Context';
1313
import EachHistorycard from '../Components/Homepage/EachHistorycard';
1414

@@ -64,6 +64,8 @@ export function HomePage({navigation}) {
6464
discreption={'Generate professional mails in with one tap.'}
6565
image={require('../Assets/mail.png')}
6666
color={'rgba(33, 64, 133, 0.30)'}
67+
navigation={navigation}
68+
route={'MailPage'}
6769
/>
6870
<EachCard
6971
title={'CODE'}
@@ -159,9 +161,10 @@ export function HomePage({navigation}) {
159161
);
160162
}
161163

162-
function EachCard({title, discreption, route, image, color}) {
164+
function EachCard({title, discreption, navigation, route, image, color}) {
163165
return (
164166
<TouchableOpacity
167+
onPress={() => navigation.navigate(route)}
165168
style={{
166169
flex: 1,
167170
backgroundColor: color,

0 commit comments

Comments
 (0)