parent
8c5dfb2f2c
commit
1354fe9479
@ -1,46 +1,46 @@
|
|||||||
import { StatusBar } from 'expo-status-bar'
|
import { StatusBar } from 'expo-status-bar'
|
||||||
import { StyleSheet, View, ImageSourcePropType} from 'react-native'
|
import { View} from 'react-native'
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import stylesScreen from './style/screens.style'
|
import stylesScreen from './style/screens.style'
|
||||||
import { User } from '../core/user';
|
|
||||||
import { Skin } from '../core/skin';
|
|
||||||
import { TopBar } from '../components/TopBar';
|
import { TopBar } from '../components/TopBar';
|
||||||
import { BotBar } from '../components/BotBar';
|
import { BotBar } from '../components/BotBar';
|
||||||
import { Conversation } from '../core/conversation';
|
import { Conversation } from '../core/conversation';
|
||||||
import { ButtonGameTypeChoice } from '../components/ButtonGameTypeChoice';
|
import { ButtonGameTypeChoice } from '../components/ButtonGameTypeChoice';
|
||||||
import tabSkinApp from '../constSkin';
|
import { useSelector } from 'react-redux';
|
||||||
import { GameSolo } from '../core/gameSolo';
|
import { RootState } from '../redux/store';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//const test= new GameSolo("test", require('bob_party/assets/ImagesJeux/BatailleNavale.jpeg'), "test", );
|
//const test= new GameSolo("test", require('bob_party/assets/ImagesJeux/BatailleNavale.jpeg'), "test", );
|
||||||
let tabConv:Conversation[]=[];
|
let tabConv:Conversation[]=[];
|
||||||
const UserActu=new User("14", "leBg", "MdpDeOuf", "ouioui", "grand", new Date(2022,12,12), 12222, 123324, 12, tabSkinApp[0], tabSkinApp, tabConv);
|
|
||||||
|
|
||||||
function Home(props: { navigation: any; }) {
|
function Home(props: { navigation: any; }) {
|
||||||
const { navigation } = props
|
const { navigation } = props
|
||||||
return (
|
|
||||||
<View style={stylesScreen.container}>
|
const currentUser = useSelector((state: RootState) => state.currentUser.value[0]);
|
||||||
<TopBar
|
|
||||||
skin={UserActu.getCurrentSkin()}
|
return (
|
||||||
nav={navigation}
|
<View style={stylesScreen.container}>
|
||||||
state= 'Home'
|
<TopBar
|
||||||
/>
|
skin={currentUser.getCurrentSkin()}
|
||||||
<View style={stylesScreen.bodyCenter}>
|
nav={navigation}
|
||||||
<ButtonGameTypeChoice
|
state= 'Home'
|
||||||
title='Jouer Seul'
|
|
||||||
onPress={() => navigation.navigate('GameChoice')}
|
|
||||||
/>
|
/>
|
||||||
<ButtonGameTypeChoice
|
<View style={stylesScreen.bodyCenter}>
|
||||||
title='Défier mes amis'
|
<ButtonGameTypeChoice
|
||||||
onPress={() => navigation.navigate('GameChoice')}
|
title='Jouer Seul'
|
||||||
|
onPress={() => navigation.navigate('GameChoice')}
|
||||||
|
/>
|
||||||
|
<ButtonGameTypeChoice
|
||||||
|
title='Défier mes amis'
|
||||||
|
onPress={() => navigation.navigate('GameChoice')}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<BotBar
|
||||||
|
nav={navigation}
|
||||||
|
state='Home'
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
<BotBar
|
|
||||||
nav={navigation}
|
|
||||||
state='Home'
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in new issue