From 656818108977ced707624e9179e5416af9c90acd Mon Sep 17 00:00:00 2001 From: alguilhot Date: Sat, 15 Oct 2022 01:32:46 +0200 Subject: [PATCH] ADD: Ajout du support de gamechoice sur BotBar et TopBar --- bob_party/src/components/BotBar.tsx | 10 ++++++++-- bob_party/src/screens/GameChoice.tsx | 15 +++------------ 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/bob_party/src/components/BotBar.tsx b/bob_party/src/components/BotBar.tsx index 41a12a5..f42e1d7 100644 --- a/bob_party/src/components/BotBar.tsx +++ b/bob_party/src/components/BotBar.tsx @@ -21,7 +21,8 @@ FC<{nav: any, state?: String }> = switch (state) { case 'Home': - imgMid = sgamepad + case 'Game': + imgMid = sgamepad break; case 'Chat': imgLeft = smessage @@ -41,7 +42,12 @@ FC<{nav: any, state?: String }> = source={imgLeft} /> - nav.navigate('HomeTab')}> + { + if (state==='Game') { + return ( nav.goBack()) + } + return (nav.navigate('HomeTab')) + }}> - @@ -39,13 +35,8 @@ function GameChoice(props: { navigation: any; }) { /> );