|
|
|
@ -4,9 +4,18 @@ import { SafeAreaView } from 'react-native-safe-area-context';
|
|
|
|
|
import MapView from 'react-native-maps';
|
|
|
|
|
import PROVIDER_OPENSTREETMAP, { Marker } from 'react-native-maps';
|
|
|
|
|
import React from 'react';
|
|
|
|
|
import { Session } from '../core/Session';
|
|
|
|
|
import { Lap as LapModel} from '../core/Lap';
|
|
|
|
|
|
|
|
|
|
export default function Lap() {
|
|
|
|
|
export default function Lap({route}) {
|
|
|
|
|
const { session } = route.params;
|
|
|
|
|
|
|
|
|
|
// const laps: LapModel[] = session.getLaps();
|
|
|
|
|
const laps: LapModel[] = session.getLaps().sort((lap1, lap2) => lap1.getNumber() - lap2.getNumber());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const currentLap: LapModel | undefined = laps[0];
|
|
|
|
|
//var currentLap : undefined; // Penser à vérifier si la session ne possède pas de tour !! si c'est le cas afficher une popup d'erreur
|
|
|
|
|
return (
|
|
|
|
|
<SafeAreaView style={styles.container}>
|
|
|
|
|
<View style={styles.container}>
|
|
|
|
@ -31,7 +40,7 @@ export default function Lap() {
|
|
|
|
|
</TouchableOpacity>
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{/* Body */}
|
|
|
|
|
<View style={styles.container}>
|
|
|
|
|
<BackgroundImage source={require('../assets/images/rdash.png')} resizeMode="contain" style={styles.backgroundImage}>
|
|
|
|
@ -43,7 +52,7 @@ export default function Lap() {
|
|
|
|
|
</View>
|
|
|
|
|
</TouchableOpacity>
|
|
|
|
|
|
|
|
|
|
<Text style={styles.text_title}>Lap X</Text>
|
|
|
|
|
<Text style={styles.text_title}>Lap {currentLap.getNumber()} </Text>
|
|
|
|
|
|
|
|
|
|
<TouchableOpacity style={styles.LapBrowserButton}>
|
|
|
|
|
<View>
|
|
|
|
|