rersistesiion integraytion api impolement
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
import React from "react";
|
||||
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
|
||||
import { View, Text } from "react-native";
|
||||
import {Ionicons} from '@react-native-vector-icons/ionicons';
|
||||
import Profile from "../screens/profile/Profile";
|
||||
|
||||
const Tab = createBottomTabNavigator();
|
||||
|
||||
// Dummy screens for now
|
||||
function HomeScreen() {
|
||||
return (
|
||||
<View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
|
||||
<Text>🏠 Home</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function SettingsScreen() {
|
||||
return (
|
||||
<View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
|
||||
<Text>⚙️ Settings</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
export default function BottomTabs() {
|
||||
return (
|
||||
<Tab.Navigator
|
||||
screenOptions={({ route }) => ({
|
||||
headerShown: false,
|
||||
tabBarShowLabel: true,
|
||||
tabBarStyle: { backgroundColor: "#111", paddingBottom: 5, height: 60 },
|
||||
tabBarActiveTintColor: "#FF7A00",
|
||||
tabBarInactiveTintColor: "gray",
|
||||
tabBarIcon: ({ color, size }) => {
|
||||
let iconName: React.ComponentProps<typeof Ionicons>['name'] = "home-outline";
|
||||
|
||||
if (route.name === "Home") iconName = "home-outline";
|
||||
else if (route.name === "Profile") iconName = "person-outline";
|
||||
else if (route.name === "Settings") iconName = "settings-outline";
|
||||
|
||||
return <Ionicons name={iconName} size={size} color={color} />;
|
||||
},
|
||||
})}
|
||||
>
|
||||
<Tab.Screen name="Home" component={HomeScreen} />
|
||||
<Tab.Screen name="Profile" component={Profile} />
|
||||
<Tab.Screen name="Settings" component={SettingsScreen} />
|
||||
</Tab.Navigator>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user