From d4d8802a5dad97d453af5f3522d69687792af294 Mon Sep 17 00:00:00 2001 From: alguilhot Date: Wed, 12 Oct 2022 14:25:27 +0200 Subject: [PATCH 1/6] =?UTF-8?q?FIX:=20r=C3=A9paration=20warn=20screen=20sa?= =?UTF-8?q?me=20name=20nested?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bob_party/src/navigation/AppNavigator.tsx | 8 ++++---- bob_party/src/screens/Chat.tsx | 6 +++--- bob_party/src/screens/Home.tsx | 8 ++++---- bob_party/src/screens/Profile.tsx | 6 +++--- bob_party/src/screens/Store.tsx | 6 +++--- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/bob_party/src/navigation/AppNavigator.tsx b/bob_party/src/navigation/AppNavigator.tsx index 1470d38..d5836c5 100644 --- a/bob_party/src/navigation/AppNavigator.tsx +++ b/bob_party/src/navigation/AppNavigator.tsx @@ -67,10 +67,10 @@ function MainTabNavigator() { backBehavior='none' screenOptions={{headerShown: false, tabBarStyle: { display: 'none' },}} > - - - - + + + + diff --git a/bob_party/src/screens/Chat.tsx b/bob_party/src/screens/Chat.tsx index c0cec66..407c844 100644 --- a/bob_party/src/screens/Chat.tsx +++ b/bob_party/src/screens/Chat.tsx @@ -13,7 +13,7 @@ function Store(props: { navigation: any; }) { return ( - navigation.navigate('Profile')}> + navigation.navigate('ProfileTab')}> - navigation.navigate('Home')}> + navigation.navigate('HomeTab')}> - navigation.navigate('Store')}> + navigation.navigate('StoreTab')}> - navigation.navigate('Profile')}> - + navigation.navigate('ProfileTab')}> + BOB PARTY navigation.navigate('Settings')}> @@ -40,7 +40,7 @@ function Home(props: { navigation: any; }) { /> - navigation.navigate('Chat')}> + navigation.navigate('ChatTab')}> - navigation.navigate('Store')}> + navigation.navigate('StoreTab')}> couille - navigation.navigate('Chat')}> + navigation.navigate('ChatTab')}> - navigation.navigate('Home')}> + navigation.navigate('HomeTab')}> - navigation.navigate('Store')}> + navigation.navigate('StoreTab')}> - navigation.navigate('Profile')}> + navigation.navigate('ProfileTab')}> couille - navigation.navigate('Chat')}> + navigation.navigate('ChatTab')}> - navigation.navigate('Home')}> + navigation.navigate('HomeTab')}> Date: Wed, 12 Oct 2022 14:27:24 +0200 Subject: [PATCH 2/6] DEL: remove console.log inutile --- bob_party/src/components/skinAvatar.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/bob_party/src/components/skinAvatar.tsx b/bob_party/src/components/skinAvatar.tsx index f0afef3..fb6ce0d 100644 --- a/bob_party/src/components/skinAvatar.tsx +++ b/bob_party/src/components/skinAvatar.tsx @@ -5,7 +5,6 @@ import React from "react" export const SkinComponent : FC<{skin: Skin, children: ImageStyle}> = ({skin, children}) => { - console.log(skin.getSkinSource()); return ( From d0c2e2dfe6b983b1f580af8a6c1ad7351915e7bb Mon Sep 17 00:00:00 2001 From: alguilhot Date: Wed, 12 Oct 2022 15:04:36 +0200 Subject: [PATCH 3/6] =?UTF-8?q?ADD:=20Ajout=20de=20la=20TopBar=20=C3=A0=20?= =?UTF-8?q?la=20branche=20typescript?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bob_party/src/components/TopBar.tsx | 23 +++++++++++++++++++++++ bob_party/src/screens/Home.tsx | 24 +++++++++++------------- 2 files changed, 34 insertions(+), 13 deletions(-) create mode 100644 bob_party/src/components/TopBar.tsx diff --git a/bob_party/src/components/TopBar.tsx b/bob_party/src/components/TopBar.tsx new file mode 100644 index 0000000..869443f --- /dev/null +++ b/bob_party/src/components/TopBar.tsx @@ -0,0 +1,23 @@ +import { FC, ReactNode } from "react" +import { Pressable, Image, ImageStyle, Text, View, Alert, ImageSourcePropType, TextStyle } from "react-native" +import { Skin } from "../core/Skin" +import React from "react" +import { SkinComponent } from "./skinAvatar" +import MainTabNavigator from "../navigation/AppNavigator" +import { BottomTabNavigationProp } from "@react-navigation/bottom-tabs" + + +export const TopBar : FC<{skin: Skin, styleAvatar: ImageStyle, title: String, rightIcon: ImageSourcePropType, styleIcon: ImageStyle,nav: any, styleTitle: TextStyle, styleHeader : any}> = ({skin, styleAvatar, title, rightIcon,styleIcon, nav, styleTitle, styleHeader}) => +{ + return ( + + nav.navigate('ProfileTab')}> + + + {title} + nav.navigate('Settings')}> + + + + ) +} \ No newline at end of file diff --git a/bob_party/src/screens/Home.tsx b/bob_party/src/screens/Home.tsx index 2d38c1e..421e742 100644 --- a/bob_party/src/screens/Home.tsx +++ b/bob_party/src/screens/Home.tsx @@ -1,9 +1,11 @@ import { StatusBar } from 'expo-status-bar' import { StyleSheet, View, Text, Alert, Pressable, Image} from 'react-native' -import React from 'react'; +import React, { Children } from 'react'; import { SkinComponent } from '../components/skinAvatar'; import { User } from '../core/user'; import { Skin } from '../core/skin'; +import { TopBar } from '../components/TopBar'; + const avatar = require('../../assets/Icons/BobClassic.png'); @@ -17,18 +19,14 @@ function Home(props: { navigation: any; }) { const { navigation } = props return ( - - navigation.navigate('ProfileTab')}> - - - BOB PARTY - navigation.navigate('Settings')}> - - - +