Changement nom component BBB
continuous-integration/drone/push Build is passing Details

finition page lobby solo
peristanceBDD
Alban GUILHOT 2 years ago
parent 3ab38b1d30
commit 1c30bdffb5

@ -0,0 +1,22 @@
import { FC } from "react"
import { Pressable, Text } from "react-native"
import React from "react"
/*
Importing the corresponding stylesheet
*/
import styles from "./style/BigBlueButton.style"
export const BigBlueButton:
/* Parameters:
* onPress : function that must be called when the button has been clicked
* title : optional text that would be in the button
*/
FC<{ onPress: any; title?: any | undefined; }>
=
({ onPress, title }) => {
return (
<Pressable style={styles.button} onPress={onPress}>
<Text style={styles.text}>{title}</Text>
</Pressable>
);
}

@ -1,23 +0,0 @@
import { FC } from "react"
import { Pressable, Text} from "react-native"
import React from "react"
/*
Importing the corresponding stylesheet
*/
import styles from "./style/ButtonGameTypeChoice.style"
export const ButtonGameTypeChoice:
/* Parameters:
* onPress : function that must be called when the button has been clicked
* title : optional text that would be in the button
*/
FC<{ onPress: any; title?: any | undefined; }>
=
({onPress,title}) =>
{
return (
<Pressable style={styles.button} onPress={onPress}>
<Text style={styles.text}>{title}</Text>
</Pressable>
);
}

@ -9,7 +9,7 @@ export default StyleSheet.create(
image : {
borderRadius: 15,
marginTop: 15,
marginRight: 15,
marginHorizontal: 7.5,
width: 100,
height: 100,
},

@ -5,7 +5,7 @@ import stylesScreen from './style/screens.style'
import { TopBar } from '../components/TopBar';
import { BotBar } from '../components/BotBar';
import { Conversation } from '../core/conversation';
import { ButtonGameTypeChoice } from '../components/ButtonGameTypeChoice';
import { BigBlueButton } from '../components/BigBlueButton';
import { useGameStore } from '../context/gameContext';
import { MANAGER_CONVERSATION, MANAGER_GAME, MANAGER_USER } from '../../appManagers';
import { socket } from '../../socketConfig';
@ -35,11 +35,11 @@ function Home(props: { navigation: any; }) {
state='Home'
/>
<View style={stylesScreen.bodyCenter}>
<ButtonGameTypeChoice
<BigBlueButton
title='Jouer Seul'
onPress={() => { MANAGER_GAME.currentGameType="solo";navigation.navigate('GameChoiceTab') }}
/>
<ButtonGameTypeChoice
<BigBlueButton
title='Défier mes amis'
onPress={() => { MANAGER_GAME.currentGameType="multi" ; navigation.navigate('GameChoiceTab')}}
/>

@ -5,9 +5,10 @@ import stylesScreen from './style/screens.style'
import { TopBar } from '../components/TopBar';
import { BotBar } from '../components/BotBar';
import { Conversation } from '../core/conversation';
import { ButtonGameTypeChoice } from '../components/ButtonGameTypeChoice';
import { BigBlueButton } from '../components/BigBlueButton';
import { useMatchStore } from '../context/matchContext';
import { MANAGER_MATCH } from '../../appManagers';
import { ScreenIndicator } from '../components/ScreenIndicator';
function LobbySolo(props: { navigation: any; }) {
@ -22,18 +23,20 @@ function LobbySolo(props: { navigation: any; }) {
nav={navigation}
state='matchmacking'
/>
<View style={stylesScreen.bodyStartCenter}>
<ScreenIndicator title="Solo"/>
<View style={stylesScreen.bodyCenter}>
<ButtonGameTypeChoice
<BigBlueButton
title='Lancer la partie'
onPress={() => navigation.navigate(MANAGER_MATCH.getCurrentMatch()?.getGame().getName().replace(/\s/g, ''))}
/>
</View>
<Image
style={{width:100, height:100}}
style={{height: '30%', width: '70%', alignSelf:'center', borderRadius: 25, marginTop: "15%"}}
source={{uri: match?.getGame().getImageSource()}}
/>
</View>
</View>
</View>
);
}

@ -6,7 +6,7 @@ import styles from './style/Settings.style';
import { TopBar } from '../components/TopBar';
import { BotBar } from '../components/BotBar';
import { Conversation } from '../core/conversation';
import { ButtonGameTypeChoice } from '../components/ButtonGameTypeChoice';
import { BigBlueButton } from '../components/BigBlueButton';
import { useMatchStore } from '../context/matchContext';
import { FlatList, TextInput } from 'react-native-gesture-handler';
import { PlayerBox } from '../components/PlayerBox';

@ -3,7 +3,7 @@ import { StyleSheet, View, ImageSourcePropType, Pressable, Text, Alert} from 're
import React, { useState } from 'react';
import stylesScreen from './style/screens.style'
import { TextInput } from 'react-native-gesture-handler';
import { ButtonGameTypeChoice } from '../components/ButtonGameTypeChoice';
import { BigBlueButton } from '../components/BigBlueButton';
import styles from "./style/SignUp.style";
import { useDispatch, useSelector } from 'react-redux';
import { checkNewUserValidity } from '../core/Auth/newUser';

Loading…
Cancel
Save