This commit is contained in:
Loewy 2024-02-20 16:13:29 -08:00
parent 0c8cad6608
commit 5cb1069c1c

View File

@ -1,6 +1,5 @@
import React, { useState } from "react"; import React, { useState } from "react";
import { Button, Image, StyleSheet, Text, View } from "react-native"; import { Image, StyleSheet, Text, View } from "react-native";
import SlideModal from "./slide-modal";
export default function SessionDetails() { export default function SessionDetails() {
// Modal State // Modal State
@ -20,45 +19,42 @@ export default function SessionDetails() {
); );
return ( return (
<> <View>
<SlideModal modalVisible={visible} setModalVisible={setVisible}> <View style={styles.headerSection}>
<View style={styles.headerSection}> <Text style={styles.header}>{sessionTitle}</Text>
<Text style={styles.header}>{sessionTitle}</Text> <Text>{date}</Text>
<Text>{date}</Text> </View>
</View> <Image
<Image source={{ uri: "https://picsum.photos/200" }}
source={{ uri: "https://picsum.photos/200" }} style={styles.image}
style={styles.image} />
/> <View style={styles.statsContainer}>
<View style={styles.statsContainer}> <View style={styles.statColumn}>
<View style={styles.statColumn}> <View style={styles.statItem}>
<View style={styles.statItem}> <Text style={styles.statLabel}>TIME PLAYED</Text>
<Text style={styles.statLabel}>TIME PLAYED</Text> <Text style={styles.statValue}>{timePlayed}</Text>
<Text style={styles.statValue}>{timePlayed}</Text>
</View>
<View style={styles.statItem}>
<Text style={styles.statLabel}>MEDIAN RUN</Text>
<Text style={styles.statValue}>{medianRun}</Text>
</View>
</View> </View>
<View style={styles.statColumn}> <View style={styles.statItem}>
<View style={styles.statItem}> <Text style={styles.statLabel}>MEDIAN RUN</Text>
<Text style={styles.statLabel}>MAKE RATE</Text> <Text style={styles.statValue}>{medianRun}</Text>
<Text style={styles.statValue}>{makeRate}</Text>
</View>
<View style={styles.statItem}>
<Text style={styles.statLabel}>SHOT PACING</Text>
<Text style={styles.statValue}>{shotPacing}</Text>
</View>
</View> </View>
</View> </View>
{/* USE A BETTER SYSTEM FOR THE DIVIDER, COULD ATTACH TO OTHER COMPONENT */} <View style={styles.statColumn}>
<View style={styles.horizontalDivider} /> <View style={styles.statItem}>
<Text style={styles.gameType}>{gameType}</Text> <Text style={styles.statLabel}>MAKE RATE</Text>
<Text style={styles.notes}>{notes}</Text> <Text style={styles.statValue}>{makeRate}</Text>
</SlideModal> </View>
<Button title="show modal" onPress={() => setVisible(true)} /> <View style={styles.statItem}>
</> <Text style={styles.statLabel}>SHOT PACING</Text>
<Text style={styles.statValue}>{shotPacing}</Text>
</View>
</View>
</View>
{/* USE A BETTER SYSTEM FOR THE DIVIDER, COULD ATTACH TO OTHER COMPONENT */}
<View style={styles.horizontalDivider} />
<Text style={styles.gameType}>{gameType}</Text>
<Text style={styles.notes}>{notes}</Text>
</View>
); );
} }