ADD: Ajout de la botbar dans toutes les vues

stub-api
Alban GUILHOT 3 years ago
parent 7cbc4f0c7d
commit 4c6366c3ed

@ -4,8 +4,8 @@ import React from "react"
export const BotBar : export const BotBar :
FC<{messages:ImageSourcePropType, games: ImageSourcePropType, shop: ImageSourcePropType, style: ImageStyle, nav: any, styleBar : any}> = FC<{messages:ImageSourcePropType, games: ImageSourcePropType, shop: ImageSourcePropType, style: ImageStyle, styleStore: ImageStyle, nav: any, styleBar : any}> =
({messages, games, shop,style, nav,styleBar}) => ({messages, games, shop,style, styleStore, nav,styleBar}) =>
{ {
return ( return (
<View style={styleBar}> <View style={styleBar}>
@ -23,7 +23,7 @@ FC<{messages:ImageSourcePropType, games: ImageSourcePropType, shop: ImageSourceP
</Pressable> </Pressable>
<Pressable onPress={() => nav.navigate('StoreTab')}> <Pressable onPress={() => nav.navigate('StoreTab')}>
<Image <Image
style={style} style={styleStore}
source={shop} source={shop}
/> />
</Pressable> </Pressable>

@ -27,26 +27,15 @@ function Chat(props: { navigation: any; }) {
<View style={styles.body}> <View style={styles.body}>
<Text style={styles.text}>couille</Text> <Text style={styles.text}>couille</Text>
</View> </View>
<View style={styles.footer}> <BotBar
<Pressable> messages={message}
<Image games={gamepad}
shop={store}
style={styles.iconFooter} style={styles.iconFooter}
source={message} styleStore={styles.iconStore}
nav={navigation}
styleBar={styles.footer}
/> />
</Pressable>
<Pressable onPress={() => navigation.navigate('HomeTab')}>
<Image
style={styles.iconFooter}
source={gamepad}
/>
</Pressable>
<Pressable onPress={() => navigation.navigate('StoreTab')}>
<Image
style={styles.iconStore}
source={store}
/>
</Pressable>
</View>
</View> </View>
); );
} }

@ -51,6 +51,7 @@ function Home(props: { navigation: any; }) {
games={gamepad} games={gamepad}
shop={store} shop={store}
style={styles.iconFooter} style={styles.iconFooter}
styleStore={styles.iconStore}
nav={navigation} nav={navigation}
styleBar={styles.footer} styleBar={styles.footer}
/> />

@ -29,26 +29,15 @@ function Profile(props: { navigation: any; }) {
<View style={styles.body}> <View style={styles.body}>
<Text style={styles.text}>couille</Text> <Text style={styles.text}>couille</Text>
</View> </View>
<View style={styles.footer}> <BotBar
<Pressable onPress={() => navigation.navigate('ChatTab')}> messages={message}
<Image games={gamepad}
shop={store}
style={styles.iconFooter} style={styles.iconFooter}
source={message} styleStore={styles.iconStore}
nav={navigation}
styleBar={styles.footer}
/> />
</Pressable>
<Pressable onPress={() => navigation.navigate('HomeTab')}>
<Image
style={styles.iconFooter}
source={gamepad}
/>
</Pressable>
<Pressable onPress={() => navigation.navigate('StoreTab')}>
<Image
style={styles.iconStore}
source={store}
/>
</Pressable>
</View>
</View> </View>
); );
} }

@ -30,14 +30,12 @@ function Store(props: { navigation: any; }) {
<View style={styles.body}> <View style={styles.body}>
<Text style={styles.text}>couille</Text> <Text style={styles.text}>couille</Text>
</View> </View>
<View style={styles.body}>
<Text style={styles.text}>couille</Text>
</View>
<BotBar <BotBar
messages={message} messages={message}
games={gamepad} games={gamepad}
shop={store} shop={store}
style={styles.iconFooter} style={styles.iconFooter}
styleStore={styles.iconStore}
nav={navigation} nav={navigation}
styleBar={styles.footer} styleBar={styles.footer}
/> />

Loading…
Cancel
Save