diff --git a/src/component/session-card/session-card-footer.tsx b/src/component/session-card/session-card-footer.tsx index b319547..fc51f24 100644 --- a/src/component/session-card/session-card-footer.tsx +++ b/src/component/session-card/session-card-footer.tsx @@ -14,15 +14,12 @@ const styles = StyleSheet.create({ sessionName: { fontSize: 18, paddingTop: 5, - marginLeft: 16, - marginRight: 16, + marginHorizontal: 16, }, sessionDatetime: { fontSize: 10, color: "#A3A3A3", - marginLeft: 16, - marginRight: 16, - marginBottom: 16, + marginHorizontal: 16, }, }); diff --git a/src/component/session-card/session-card-header.tsx b/src/component/session-card/session-card-header.tsx index 1512086..1949b27 100644 --- a/src/component/session-card/session-card-header.tsx +++ b/src/component/session-card/session-card-header.tsx @@ -4,25 +4,24 @@ import { Image, StyleSheet, Text, View } from "react-native"; const SessionCardHeader = ({ playerName, location, - type, + gameType, locationIconURL, profileImageURL, }) => { return ( - - - + {playerName} {location} - {type} + {gameType} ); @@ -32,8 +31,7 @@ const styles = StyleSheet.create({ headerContainer: { flexDirection: "row", alignItems: "center", - marginLeft: 16, - marginRight: 16, + marginHorizontal: 16, }, headerProfileImage: { diff --git a/src/component/session-card/session-card-stat.tsx b/src/component/session-card/session-card-stat.tsx index 96ab432..9c1b52c 100644 --- a/src/component/session-card/session-card-stat.tsx +++ b/src/component/session-card/session-card-stat.tsx @@ -1,14 +1,11 @@ import React from "react"; import { StyleSheet, Text, View } from "react-native"; -const SessionCardStat = ({ aggregateStat, displayName, numberFormat }) => { +const SessionCardStat = ({ sessionStat, displayName }) => { return ( {displayName} - - {aggregateStat} - {numberFormat} - + {sessionStat} ); }; diff --git a/src/component/session-card/session-card-stats-row-container.tsx b/src/component/session-card/session-card-stats-row-container.tsx index 5c19735..0c54a8f 100644 --- a/src/component/session-card/session-card-stats-row-container.tsx +++ b/src/component/session-card/session-card-stats-row-container.tsx @@ -8,39 +8,24 @@ const SessionCardStatsRowContainer = ({ duration, shotPacing, }) => { + const stats = [ + { displayName: "Make Percent", sessionStat: makePercent }, + { displayName: "Median Run", sessionStat: medianRun }, + { displayName: "Time Played", sessionStat: duration }, + { displayName: "Shot Pacing", sessionStat: shotPacing }, + ]; + return ( - - - - - - - - - - - - - - - + {stats.map((stat, index) => ( + + + {index < stats.length - 1 && } + + ))} ); }; @@ -48,14 +33,14 @@ const SessionCardStatsRowContainer = ({ const styles = StyleSheet.create({ statsContainer: { flexDirection: "row", - justifyContent: "space-around", + justifyContent: "space-between", + alignItems: "center", margin: 16, - textAlign: "center", }, verticalSpacer: { - width: 0.5, + width: 1, backgroundColor: "#A3A3A3", - height: "75%", + height: "100%", marginHorizontal: 12, }, }); diff --git a/src/component/session-card/session-card.tsx b/src/component/session-card/session-card.tsx index e3e5de1..566ecca 100644 --- a/src/component/session-card/session-card.tsx +++ b/src/component/session-card/session-card.tsx @@ -7,7 +7,7 @@ import SessionCardStatsRowContainer from "./session-card-stats-row-container"; const SessionCard = ({ playerName, location, - type, + gameType, makePercent, medianRun, duration, @@ -18,26 +18,23 @@ const SessionCard = ({ profileImageURL, locationIconURL, }) => { - console.log(imageURL); return ( - - - - - - - + + + + + ); }; @@ -45,6 +42,19 @@ const SessionCard = ({ const styles = StyleSheet.create({ card: { backgroundColor: "white", + borderRadius: 8, + borderWidth: 1, + borderColor: "#ddd", + shadowColor: "#000", + shadowOffset: { + width: 0, + height: 2, + }, + shadowOpacity: 0.25, + shadowRadius: 3.84, + elevation: 5, + margin: 10, + overflow: "hidden", }, image: { width: "100%", diff --git a/src/screens/session-stack/session-feed.tsx b/src/screens/session-stack/session-feed.tsx index bf99074..78cae9c 100644 --- a/src/screens/session-stack/session-feed.tsx +++ b/src/screens/session-stack/session-feed.tsx @@ -25,7 +25,7 @@ const SessionFeed: React.FC = ({ navigation }) => {