Skip to content

Commit

Permalink
Add icons to home tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego Romero committed Nov 26, 2023
1 parent 326ecce commit 185d672
Showing 1 changed file with 32 additions and 4 deletions.
36 changes: 32 additions & 4 deletions apps/expo/src/screens/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,44 @@ import ProfileScreen from "./profile";
import { SafeAreaView } from "react-native-safe-area-context";
import { HomeTabParamList } from "../types/navigation";
import CartListScreen from "./cart-list";
import Ionicons from "@expo/vector-icons/Ionicons";

const Tab = createBottomTabNavigator<HomeTabParamList>();

function HomeScreen() {
return (
<SafeAreaView className="h-full">
<Tab.Navigator screenOptions={{ headerShown: false }}>
<Tab.Screen name="Search" component={ItemListScreen} />
<Tab.Screen name="Cart" component={CartListScreen} />
<Tab.Screen name="My Profile" component={ProfileScreen} />
<Tab.Navigator
screenOptions={({ route }) => ({

Check warning on line 15 in apps/expo/src/screens/home.tsx

View workflow job for this annotation

GitHub Actions / build-lint

'route' is defined but never used
headerShown: false,
tabBarShowLabel: false,
})}
>
<Tab.Screen
name="Search"
component={ItemListScreen}
options={{
tabBarIcon: (props) => (
<Ionicons name="search-outline" {...props} />
),
}}
/>
<Tab.Screen
name="Cart"
component={CartListScreen}
options={{
tabBarIcon: (props) => <Ionicons name="cart-outline" {...props} />,
}}
/>
<Tab.Screen
name="My Profile"
component={ProfileScreen}
options={{
tabBarIcon: (props) => (
<Ionicons name="person-outline" {...props} />
),
}}
/>
</Tab.Navigator>
</SafeAreaView>
);
Expand Down

0 comments on commit 185d672

Please sign in to comment.