int work and icon on header

This commit is contained in:
Adolfo Reyna
2023-01-08 20:42:09 -05:00
parent c725eda32f
commit caf2a8ee04
6 changed files with 55 additions and 27 deletions

14
App.js
View File

@@ -3,7 +3,7 @@ import React, { useState, useRef, useEffect } from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { Provider as PaperProvider, DefaultTheme, Appbar, Button, } from 'react-native-paper';
import { Provider as PaperProvider, DefaultTheme, Appbar, Button } from 'react-native-paper';
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
import Login from "./Views/Login.js"
import Feed from "./Views/Feed.js"
@@ -18,7 +18,7 @@ import * as Notifications from 'expo-notifications';
import API from './API.js';
import i18n from "./i18nMessages.js";
import NewPostView from './Views/NewPost.js';
import { TouchableOpacity, View } from 'react-native';
import { TouchableOpacity, View, Image } from 'react-native';
import MenuView from './Views/Menu.js';
import ProfileSettings from './Views/ProfileSettings.js';
import InviteView from './Views/Invite.js';
@@ -229,7 +229,15 @@ export default function App() {
{props.navigation.canGoBack() ? <Appbar.BackAction onPress={()=>{
props.navigation.goBack();
}} /> : <></>}
<Appbar.Content title='EMI Fellowship'/>
<Appbar.Content title={
<Button icon={({ size, color }) => (
<Image
source={require('./assets/icon.png')}
style={{ width: size, height: size }}
/>
)} mode="text" >EMI Fellowship</Button>
} titleStyle={{}}/>
<Appbar.Action icon="chat" onPress={()=>{alert("Chats are comming soon.")}} />
<Appbar.Action icon="search" onPress={()=>{props.navigation.navigate("Search")}} />
<Appbar.Action icon="notifications" onPress={()=>{props.navigation.navigate("Notifications")}} />
</Appbar.Header>