Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions app/(tabs)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,72 @@ export default function TabLayout() {
tabBarIcon: ({ color }) => <TabBarIcon name="th-large" color={color} />,
}}
/>

<Tabs.Screen
name="dessert/index"
options={{
headerShown: false,
tabBarButton: () => null, // Esconde o botão da tab
}}
/>


<Tabs.Screen
name="feelings/index"
options={{
headerShown: false,
tabBarButton: () => null, // Esconde o botão da tab
}}
/>
<Tabs.Screen
name="houseRoutine/index"
options={{
headerShown: false,
tabBarButton: () => null, // Esconde o botão da tab
}}
/>
<Tabs.Screen
name="places/index"
options={{
headerShown: false,
tabBarButton: () => null, // Esconde o botão da tab
}}
/>
<Tabs.Screen
name="toysGames/index"
options={{
headerShown: false,
tabBarButton: () => null, // Esconde o botão da tab
}}
/>
<Tabs.Screen
name="school/index"
options={{
headerShown: false,
tabBarButton: () => null, // Esconde o botão da tab
}}
/>
<Tabs.Screen
name="foods/index"
options={{
headerShown: false,
tabBarButton: () => null, // Esconde o botão da tab
}}
/>
<Tabs.Screen
name="acoes/index"
options={{
headerShown: false,
tabBarButton: () => null, // Esconde o botão da tab
}}
/>





</Tabs>


);
}
26 changes: 25 additions & 1 deletion app/(tabs)/dessert/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,21 @@ const DessertScreen: React.FC = () => {
}, 2000);

};
// Função para voltar para categorias
const handleVoltarCategorias = () => {
router.push('/categories');
};


return (
<View style={styles.container}>
<FraseBarra />
{/* Botão Voltar para Categorias */}
<TouchableOpacity style={styles.voltarButton} onPress={handleVoltarCategorias}>
<Text style={styles.voltarButtonText}>← VOLTAR</Text>
</TouchableOpacity>


<FraseBarra fraseVazia="🍰 ESCOLHA UMA FIGURA" />
<ScrollView contentContainerStyle={styles.scrollContainer}>
{sobremesas.map((item, index) => (
<TouchableOpacity
Expand All @@ -101,6 +111,20 @@ const styles = StyleSheet.create({
flex: 1,
backgroundColor: '#fff',
},
voltarButton: {
paddingHorizontal: 20,
paddingVertical: 10,
backgroundColor: '#eee',
margin: 10,
borderRadius: 8,
alignSelf: 'flex-start',
},
voltarButtonText: {
fontSize: 16,
color: '#333',
fontWeight: 'bold',
textTransform: 'uppercase',
},
scrollContainer: {
flexDirection: 'row',
flexWrap: 'wrap',
Expand Down
10 changes: 7 additions & 3 deletions components/FraseBarra.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
import { usePhraseStore } from '../store/phraseStore';
import * as Speech from 'expo-speech';

const FraseBarra = () => {
const { phrase, clearPhrase } = usePhraseStore();
interface FraseBarraProps {
fraseVazia?: string; // 👈 nova prop opcional
}

const FraseBarra: React.FC<FraseBarraProps> = ({ fraseVazia }) => {
const { phrase, clearPhrase } = usePhraseStore();;

const speakPhrase = () => {
const phraseText = phrase.join(' ');
Expand All @@ -17,7 +21,7 @@ const FraseBarra = () => {
<View style={styles.container}>
{phrase.length === 0 ? (
<Text style={[styles.text, styles.placeholder]}>
💬 ESCOLHA UM QUADRINHO
{fraseVazia || '💬 ESCOLHA UM QUADRINHO'}
</Text>
) : (
<Text style={styles.text}>{phrase.join(' ')}</Text>
Expand Down