int work and icon on header
This commit is contained in:
14
App.js
14
App.js
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user