From b5e942b6437d47760f416736117e59cb31c27e70 Mon Sep 17 00:00:00 2001 From: 230417 <230417@epvc.pt> Date: Wed, 13 May 2026 10:35:28 +0100 Subject: [PATCH] refactor: remove schedule from barber data and update navigation icons to use Ionicons --- src/context/AppContext.tsx | 2 -- src/navigation/AppNavigator.tsx | 19 ++++++++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/context/AppContext.tsx b/src/context/AppContext.tsx index 589e7eb..1b1e9b3 100644 --- a/src/context/AppContext.tsx +++ b/src/context/AppContext.tsx @@ -441,7 +441,6 @@ export const AppProvider = ({ children }: { children: React.ReactNode }) => { shop_id: shopId, name: barber.name, specialties: barber.specialties, - schedule: barber.schedule || [], image_url: barber.imageUrl, }]); if (error) { @@ -455,7 +454,6 @@ export const AppProvider = ({ children }: { children: React.ReactNode }) => { await supabase.from('barbers').update({ name: barber.name, specialties: barber.specialties, - schedule: barber.schedule, image_url: barber.imageUrl, }).eq('id', barber.id); await refreshShops(); diff --git a/src/navigation/AppNavigator.tsx b/src/navigation/AppNavigator.tsx index 53c6daf..90dd13c 100644 --- a/src/navigation/AppNavigator.tsx +++ b/src/navigation/AppNavigator.tsx @@ -3,6 +3,7 @@ import { NavigationContainer } from '@react-navigation/native'; import { createNativeStackNavigator } from '@react-navigation/native-stack'; import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import { View, Text, StyleSheet, Platform } from 'react-native'; +import { Ionicons } from '@expo/vector-icons'; import { useApp } from '../context/AppContext'; import AuthLogin from '../pages/AuthLogin'; import AuthRegister from '../pages/AuthRegister'; @@ -17,9 +18,13 @@ import EventsCreate from '../pages/EventsCreate'; const Stack = createNativeStackNavigator(); const Tab = createBottomTabNavigator(); -const TabIcon = ({ icon, focused }: { icon: string; focused: boolean }) => ( +const TabIcon = ({ name, focused }: { name: any; focused: boolean }) => ( - {icon} + ); @@ -70,7 +75,7 @@ function ClientTabs() { component={ExploreStack} options={{ tabBarLabel: 'Explorar', - tabBarIcon: ({ focused }) => , + tabBarIcon: ({ focused }) => , }} /> , + tabBarIcon: ({ focused }) => , tabBarBadge: cart.length > 0 ? cart.length : undefined, tabBarBadgeStyle: tabStyles.badge, }} @@ -88,7 +93,7 @@ function ClientTabs() { component={ClientProfileStack} options={{ tabBarLabel: 'Perfil', - tabBarIcon: ({ focused }) => , + tabBarIcon: ({ focused }) => , }} /> @@ -130,7 +135,7 @@ function BarbeariaTabs() { component={DashboardStack} options={{ tabBarLabel: 'Painel', - tabBarIcon: ({ focused }) => , + tabBarIcon: ({ focused }) => , }} /> , + tabBarIcon: ({ focused }) => , }} />