home page merge

test-view
Nicolas FRANCO 2 years ago
commit 3ec05bcf06

@ -0,0 +1,25 @@
# code-analysis only
#
kind: pipeline
type: docker
name: WhiteJohn
trigger:
event:
- push
steps:
- name: code-analysis
image: reactnativecommunity/react-native-android
environement:
REACT_TOKEN:
from_secret: react_token
commands:
- export SONAR_SCANNER_VERSION=4.7.0.2747
- export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
- curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip
- unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
- export PATH=$SONAR_SCANNER_HOME/bin:$PATH
- export SONAR_SCANNER_OPTS="-server"
- sonar-scanner -Dsonar.projectKey=WhiteJohn -Dsonar.sources=. -Dsonar.host.url=https://codefirst.iut.uca.fr/sonar -Dsonar.login=sqp_5651a992840b34100c69fba16b7aae2db6670206

@ -1,10 +1,23 @@
import { StatusBar } from 'expo-status-bar'; import { StatusBar } from 'expo-status-bar';
import { Component } from 'react'; import { StyleSheet, View, TouchableOpacity, SafeAreaView, ImageBackground} from 'react-native';
import { StyleSheet, Text, Image, View, TouchableOpacity, SafeAreaView, ImageBackground} from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons'; import Icon from 'react-native-vector-icons/Ionicons';
import Navigation from '../StackNavigation'; import {useSelector, useDispatch} from 'react-redux';
import { useEffect } from 'react';
import { newGame } from '../redux/actions/newGame';
export default function HomeScreen() {
console.log("test?");
const game = useSelector(state => state.appReducer.game);
const dispatch = useDispatch();
useEffect(() => {
const loadGame = async () => {
await dispatch(newGame());
};
loadGame();
}, [dispatch]);
export default function HomeScreen({navigation}) {
return ( return (
<SafeAreaView> <SafeAreaView>
<View> <View>
@ -21,20 +34,35 @@ export default function HomeScreen({navigation}) {
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
backgroundImage: { container: {
width: `100%`, flex: 1,
height: `100%`, backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
middle: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'flex-end',
},
down: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'flex-end',
}, },
buttonForm: { buttonForm: {
height: '110%', width: 80,
justifyContent: 'center', height: 80,
borderColor: 'black',
borderWidth: 5,
borderRadius: 40,
alignItems: 'center', alignItems: 'center',
justifyContent: 'center',
}, },
buttonImage: {
height: 20,
width: 20,
}
}); });
// export const CARD_LIST : Card[] = [
// new Card(1,7,"hearts",""),
// new Card(2,8,"hearts",""),
// new Card(3,9,"hearts",""),
// ]

Loading…
Cancel
Save