ADD: Ajout de la BotBar sur les pages Home & Store

stub-api
Alban GUILHOT 3 years ago
parent 232f97460a
commit 704e203051

@ -0,0 +1,32 @@
import { FC, ReactNode } from "react"
import { Pressable, Image, ImageStyle, Text, View, Alert, ImageSourcePropType, TextStyle } from "react-native"
import React from "react"
export const BotBar :
FC<{messages:ImageSourcePropType, games: ImageSourcePropType, shop: ImageSourcePropType, style: ImageStyle, nav: any, styleBar : any}> =
({messages, games, shop,style, nav,styleBar}) =>
{
return (
<View style={styleBar}>
<Pressable onPress={() => nav.navigate('ChatTab')}>
<Image
style={style}
source={messages}
/>
</Pressable>
<Pressable onPress={()=> nav.navigate('HomeTab')}>
<Image
style={style}
source={games}
/>
</Pressable>
<Pressable onPress={() => nav.navigate('StoreTab')}>
<Image
style={style}
source={shop}
/>
</Pressable>
</View>
)
}

@ -3,6 +3,7 @@ import { StyleSheet, View, Text, Alert, Pressable, Image} from 'react-native'
import React from 'react'; import React from 'react';
import { Skin } from '../core/skin'; import { Skin } from '../core/skin';
import { TopBar } from '../components/TopBar'; import { TopBar } from '../components/TopBar';
import { BotBar } from '../components/BotBar';
const avatar = require('../../assets/Icons/BobClassic.png'); const avatar = require('../../assets/Icons/BobClassic.png');
const skinTest= new Skin("Bob",require('../../assets/Icons/BobClassic.png')); const skinTest= new Skin("Bob",require('../../assets/Icons/BobClassic.png'));
@ -22,7 +23,7 @@ function Chat(props: { navigation: any; }) {
rightIcon={engrenage} rightIcon={engrenage}
styleIcon={styles.engrenage} styleIcon={styles.engrenage}
nav={navigation} styleTitle={styles.titre} styleHeader={styles.header} nav={navigation} styleTitle={styles.titre} styleHeader={styles.header}
/> />
<View style={styles.body}> <View style={styles.body}>
<Text style={styles.text}>couille</Text> <Text style={styles.text}>couille</Text>
</View> </View>

@ -5,6 +5,7 @@ import { SkinComponent } from '../components/skinAvatar';
import { User } from '../core/user'; import { User } from '../core/user';
import { Skin } from '../core/skin'; import { Skin } from '../core/skin';
import { TopBar } from '../components/TopBar'; import { TopBar } from '../components/TopBar';
import { BotBar } from '../components/BotBar';
@ -25,7 +26,9 @@ function Home(props: { navigation: any; }) {
title="BOB PARTY" title="BOB PARTY"
rightIcon={engrenage} rightIcon={engrenage}
styleIcon={styles.engrenage} styleIcon={styles.engrenage}
nav={navigation} styleTitle={styles.titre} styleHeader={styles.header} nav={navigation}
styleTitle={styles.titre}
styleHeader={styles.header}
/> />
<View style={styles.body}> <View style={styles.body}>
<Button <Button
@ -37,26 +40,14 @@ function Home(props: { navigation: any; }) {
onPress={() => Alert.alert('On Joue avec les potos')} onPress={() => Alert.alert('On Joue avec les potos')}
/> />
</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} nav={navigation}
/> styleBar={styles.footer}
</Pressable> />
<Pressable >
<Image
style={styles.iconFooter}
source={gamepad}
/>
</Pressable>
<Pressable onPress={() => navigation.navigate('StoreTab')}>
<Image
style={styles.iconStore}
source={store}
/>
</Pressable>
</View>
</View> </View>
); );
} }

@ -5,8 +5,7 @@ import { SkinComponent } from '../components/skinAvatar';
import { User } from '../core/user'; import { User } from '../core/user';
import { Skin } from '../core/skin'; import { Skin } from '../core/skin';
import { TopBar } from '../components/TopBar'; import { TopBar } from '../components/TopBar';
import { BotBar } from '../components/BotBar';
const avatar = require('../../assets/Icons/BobClassic.png'); const avatar = require('../../assets/Icons/BobClassic.png');
const skinTest= new Skin("Bob",require('../../assets/Icons/BobClassic.png')); const skinTest= new Skin("Bob",require('../../assets/Icons/BobClassic.png'));
@ -26,7 +25,7 @@ function Profile(props: { navigation: any; }) {
rightIcon={engrenage} rightIcon={engrenage}
styleIcon={styles.engrenage} styleIcon={styles.engrenage}
nav={navigation} styleTitle={styles.titre} styleHeader={styles.header} nav={navigation} styleTitle={styles.titre} styleHeader={styles.header}
/> />
<View style={styles.body}> <View style={styles.body}>
<Text style={styles.text}>couille</Text> <Text style={styles.text}>couille</Text>
</View> </View>

@ -5,6 +5,7 @@ import { SkinComponent } from '../components/skinAvatar';
import { User } from '../core/user'; import { User } from '../core/user';
import { Skin } from '../core/skin'; import { Skin } from '../core/skin';
import { TopBar } from '../components/TopBar'; import { TopBar } from '../components/TopBar';
import { BotBar } from '../components/BotBar';
const avatar = require('../../assets/Icons/BobClassic.png'); const avatar = require('../../assets/Icons/BobClassic.png');
@ -14,7 +15,6 @@ const gamepad = require('../../assets/Icons/UnSelected/Gamepad.png');
const message = require('../../assets/Icons/UnSelected/Chat.png'); const message = require('../../assets/Icons/UnSelected/Chat.png');
const store = require('../../assets/Icons/Selected/SStore.png'); const store = require('../../assets/Icons/Selected/SStore.png');
function Store(props: { navigation: any; }) { function Store(props: { navigation: any; }) {
const { navigation } = props const { navigation } = props
return ( return (
@ -30,26 +30,17 @@ 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.footer}> <View style={styles.body}>
<Pressable onPress={() => navigation.navigate('ChatTab')}> <Text style={styles.text}>couille</Text>
<Image
style={styles.iconFooter}
source={message}
/>
</Pressable>
<Pressable onPress={() => navigation.navigate('HomeTab')}>
<Image
style={styles.iconFooter}
source={gamepad}
/>
</Pressable>
<Pressable >
<Image
style={styles.iconStore}
source={store}
/>
</Pressable>
</View> </View>
<BotBar
messages={message}
games={gamepad}
shop={store}
style={styles.iconFooter}
nav={navigation}
styleBar={styles.footer}
/>
</View> </View>
); );
} }

Loading…
Cancel
Save