renamed files and directories to get rid of session references
This commit is contained in:
parent
cef4119afa
commit
4df6e51e82
@ -118,7 +118,7 @@ export const useVideoDetails = ({
|
||||
}
|
||||
|
||||
// Navigate if starting flow, terminateUploadStream if completing flow
|
||||
if (mode === "start-video") {
|
||||
if (mode === "start-recording") {
|
||||
const params: VideoFlowInputParams = {
|
||||
sessionName,
|
||||
gameType: gameType.value,
|
@ -1,26 +1,26 @@
|
||||
import React from "react";
|
||||
import { StyleSheet, Text, View } from "react-native";
|
||||
|
||||
const SessionCardFooter = ({ sessionName, lastPlayed }) => {
|
||||
const VideoCardFooter = ({ videoName, lastPlayed }) => {
|
||||
return (
|
||||
<View>
|
||||
<Text style={styles.sessionName}>{sessionName}</Text>
|
||||
<Text style={styles.sessionDatetime}>{lastPlayed}</Text>
|
||||
<Text style={styles.videoName}>{videoName}</Text>
|
||||
<Text style={styles.videoDatetime}>{lastPlayed}</Text>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
sessionName: {
|
||||
videoName: {
|
||||
fontSize: 18,
|
||||
paddingTop: 5,
|
||||
marginHorizontal: 16,
|
||||
},
|
||||
sessionDatetime: {
|
||||
videoDatetime: {
|
||||
fontSize: 10,
|
||||
color: "#A3A3A3",
|
||||
marginHorizontal: 16,
|
||||
},
|
||||
});
|
||||
|
||||
export default SessionCardFooter;
|
||||
export default VideoCardFooter;
|
@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
import { Image, StyleSheet, Text, View } from "react-native";
|
||||
|
||||
const SessionCardHeader = ({
|
||||
const VideoCardHeader = ({
|
||||
playerName,
|
||||
location,
|
||||
gameType,
|
||||
@ -65,4 +65,4 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
export default SessionCardHeader;
|
||||
export default VideoCardHeader;
|
@ -1,11 +1,11 @@
|
||||
import React from "react";
|
||||
import { StyleSheet, Text, View } from "react-native";
|
||||
|
||||
const SessionCardStat = ({ sessionStat, displayName }) => {
|
||||
const VideoCardStat = ({ videoStat, displayName }) => {
|
||||
return (
|
||||
<View>
|
||||
<Text style={styles.statItem}>{displayName}</Text>
|
||||
<Text style={styles.statValue}>{sessionStat}</Text>
|
||||
<Text style={styles.statValue}>{videoStat}</Text>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
@ -22,4 +22,4 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
export default SessionCardStat;
|
||||
export default VideoCardStat;
|
@ -1,27 +1,27 @@
|
||||
import React from "react";
|
||||
import { StyleSheet, View } from "react-native";
|
||||
import SessionCardStat from "./session-card-stat";
|
||||
import VideoCardStat from "./video-card-stat";
|
||||
|
||||
const SessionCardStatsRowContainer = ({
|
||||
const VideoCardStatsRowContainer = ({
|
||||
makePercent,
|
||||
medianRun,
|
||||
duration,
|
||||
shotPacing,
|
||||
}) => {
|
||||
const stats = [
|
||||
{ displayName: "Make Percent", sessionStat: makePercent },
|
||||
{ displayName: "Median Run", sessionStat: medianRun },
|
||||
{ displayName: "Time Played", sessionStat: duration },
|
||||
{ displayName: "Shot Pacing", sessionStat: shotPacing },
|
||||
{ displayName: "Make Percent", videoStat: makePercent },
|
||||
{ displayName: "Median Run", videoStat: medianRun },
|
||||
{ displayName: "Time Played", videoStat: duration },
|
||||
{ displayName: "Shot Pacing", videoStat: shotPacing },
|
||||
];
|
||||
|
||||
return (
|
||||
<View style={styles.statsContainer}>
|
||||
{stats.map((stat, index) => (
|
||||
<React.Fragment key={index}>
|
||||
<SessionCardStat
|
||||
<VideoCardStat
|
||||
displayName={stat.displayName}
|
||||
sessionStat={stat.sessionStat}
|
||||
videoStat={stat.videoStat}
|
||||
/>
|
||||
{index < stats.length - 1 && <View style={styles.verticalSpacer} />}
|
||||
</React.Fragment>
|
||||
@ -45,4 +45,4 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
export default SessionCardStatsRowContainer;
|
||||
export default VideoCardStatsRowContainer;
|
@ -1,10 +1,10 @@
|
||||
import React from "react";
|
||||
import { Image, StyleSheet, View } from "react-native";
|
||||
import SessionCardFooter from "./session-card-footer";
|
||||
import SessionCardHeader from "./session-card-header";
|
||||
import SessionCardStatsRowContainer from "./session-card-stats-row-container";
|
||||
import VideoCardFooter from "./video-card-footer";
|
||||
import VideoCardHeader from "./video-card-header";
|
||||
import VideoCardStatsRowContainer from "./video-card-stats-row-container";
|
||||
|
||||
const SessionCard = ({
|
||||
const VideoCard = ({
|
||||
playerName,
|
||||
location,
|
||||
gameType,
|
||||
@ -12,7 +12,7 @@ const SessionCard = ({
|
||||
medianRun,
|
||||
duration,
|
||||
shotPacing,
|
||||
sessionName,
|
||||
videoName,
|
||||
lastPlayed,
|
||||
imageURL,
|
||||
profileImageURL,
|
||||
@ -20,21 +20,21 @@ const SessionCard = ({
|
||||
}) => {
|
||||
return (
|
||||
<View style={styles.card}>
|
||||
<SessionCardHeader
|
||||
<VideoCardHeader
|
||||
playerName={playerName}
|
||||
location={location}
|
||||
gameType={gameType}
|
||||
locationIconURL={locationIconURL}
|
||||
profileImageURL={profileImageURL}
|
||||
/>
|
||||
<SessionCardStatsRowContainer
|
||||
<VideoCardStatsRowContainer
|
||||
makePercent={makePercent}
|
||||
medianRun={medianRun}
|
||||
duration={duration}
|
||||
shotPacing={shotPacing}
|
||||
/>
|
||||
<Image source={imageURL} style={styles.image} />
|
||||
<SessionCardFooter sessionName={sessionName} lastPlayed={lastPlayed} />
|
||||
<VideoCardFooter videoName={videoName} lastPlayed={lastPlayed} />
|
||||
</View>
|
||||
);
|
||||
};
|
||||
@ -62,4 +62,4 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
export default SessionCard;
|
||||
export default VideoCard;
|
@ -1,11 +1,11 @@
|
||||
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
|
||||
import { createNativeStackNavigator } from "@react-navigation/native-stack";
|
||||
import { Image } from "react-native";
|
||||
import CameraScreen from "../component/video/camera";
|
||||
import CameraScreen from "../component/recording/camera";
|
||||
import Profile from "../screens/profile";
|
||||
import Session from "../screens/session-stack/session";
|
||||
import SessionFeed from "../screens/session-stack/session-feed";
|
||||
import VideoDetails from "../screens/video-stack/video-details";
|
||||
import RecordingDetails from "../screens/recording-stack/recording-details";
|
||||
import Video from "../screens/video-stack/video-detail";
|
||||
import VideoFeed from "../screens/video-stack/video-feed";
|
||||
import { tabIconColors } from "../styles";
|
||||
|
||||
import Icon from "../assets/icons/favicon.png";
|
||||
@ -15,34 +15,34 @@ const RecordStack = createNativeStackNavigator();
|
||||
|
||||
// tabBarIcon configuration should live on separate file and contain all logic/icons/rendering for the Tabs
|
||||
const tabIcons = {
|
||||
SessionStack: <Image source={Icon} style={{ width: 20, height: 20 }} />,
|
||||
VideoStack: <Image source={Icon} style={{ width: 20, height: 20 }} />,
|
||||
RecordingStack: <Image source={Icon} style={{ width: 20, height: 20 }} />,
|
||||
Profile: <Image source={Icon} style={{ width: 20, height: 20 }} />,
|
||||
};
|
||||
|
||||
function VideoTabStack() {
|
||||
function RecordingTabStack() {
|
||||
return (
|
||||
<RecordStack.Navigator screenOptions={{ headerShown: false }}>
|
||||
<RecordStack.Screen
|
||||
name="Record"
|
||||
component={VideoDetails}
|
||||
initialParams={{ mode: "start-video" }}
|
||||
component={RecordingDetails}
|
||||
initialParams={{ mode: "start-recording" }}
|
||||
/>
|
||||
<RecordStack.Screen name="Camera" component={CameraScreen} />
|
||||
<RecordStack.Screen
|
||||
name="SaveVideo"
|
||||
component={VideoDetails}
|
||||
initialParams={{ mode: "save-video" }}
|
||||
name="SaveRecording"
|
||||
component={RecordingDetails}
|
||||
initialParams={{ mode: "save-recording" }}
|
||||
/>
|
||||
</RecordStack.Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
function SessionTabStack() {
|
||||
function VideoTabStack() {
|
||||
return (
|
||||
<RecordStack.Navigator screenOptions={{ headerShown: false }}>
|
||||
<RecordStack.Screen name="SessionFeed" component={SessionFeed} />
|
||||
<RecordStack.Screen name="Session" component={Session} />
|
||||
<RecordStack.Screen name="VideoFeed" component={VideoFeed} />
|
||||
<RecordStack.Screen name="Video" component={Video} />
|
||||
</RecordStack.Navigator>
|
||||
);
|
||||
}
|
||||
@ -67,14 +67,14 @@ export default function Tabs(): React.JSX.Element {
|
||||
},
|
||||
})}
|
||||
>
|
||||
<Tab.Screen
|
||||
name="SessionStack"
|
||||
component={SessionTabStack}
|
||||
options={{ tabBarLabel: "Session" }}
|
||||
/>
|
||||
<Tab.Screen
|
||||
name="VideoStack"
|
||||
component={VideoTabStack}
|
||||
options={{ tabBarLabel: "Video" }}
|
||||
/>
|
||||
<Tab.Screen
|
||||
name="RecordingStack"
|
||||
component={RecordingTabStack}
|
||||
options={{ tabBarLabel: "Record" }}
|
||||
/>
|
||||
<Tab.Screen
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
View,
|
||||
} from "react-native";
|
||||
import DropDownPicker from "react-native-dropdown-picker";
|
||||
import { useVideoDetails } from "../../component/video/use-video-details";
|
||||
import { useVideoDetails } from "../../component/recording/use-recording-details";
|
||||
import { globalInputStyles } from "../../styles";
|
||||
import { recordStyles as styles } from "./styles";
|
||||
|
||||
@ -32,7 +32,7 @@ export default function VideoDetails({ navigation, route }): React.JSX.Element {
|
||||
<TouchableWithoutFeedback onPress={() => Keyboard.dismiss()}>
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.headerText}>
|
||||
{mode === "start-video" ? "Record Session" : "Save Session"}
|
||||
{mode === "start-recording" ? "Record Session" : "Save Session"}
|
||||
</Text>
|
||||
<View style={globalInputStyles.dropdownContainer}>
|
||||
<Text style={globalInputStyles.dropdownTitle}>Session Name</Text>
|
||||
@ -70,7 +70,7 @@ export default function VideoDetails({ navigation, route }): React.JSX.Element {
|
||||
</View>
|
||||
|
||||
<View style={styles.buttonContainer}>
|
||||
{mode === "start-video" && (
|
||||
{mode === "start-recording" && (
|
||||
<TouchableOpacity
|
||||
style={styles.buttonStyle}
|
||||
onPress={() => navigation.goBack()}
|
||||
@ -83,7 +83,7 @@ export default function VideoDetails({ navigation, route }): React.JSX.Element {
|
||||
<ActivityIndicator color="#fff" />
|
||||
) : (
|
||||
<Text style={styles.buttonText}>
|
||||
{mode === "start-video" ? "Next" : "Save"}
|
||||
{mode === "start-recording" ? "Next" : "Save"}
|
||||
</Text>
|
||||
)}
|
||||
</TouchableOpacity>
|
@ -8,7 +8,7 @@ import BarGraph from "../../component/charts/bar-graph/bar-graph";
|
||||
import ChartContainer from "../../component/charts/container/chart-container";
|
||||
import LineGraph from "../../component/charts/line-graph/line-graph";
|
||||
|
||||
export default function SessionScreen() {
|
||||
export default function VideoScreen() {
|
||||
return (
|
||||
<View style={StyleSheet.absoluteFill}>
|
||||
<ChartContainer data={line_chart_two_y_data} ChartComponent={LineGraph} />
|
@ -1,28 +1,28 @@
|
||||
import { StackNavigationProp } from "@react-navigation/stack";
|
||||
import React from "react";
|
||||
import { StyleSheet, TouchableOpacity, View } from "react-native";
|
||||
import sampleSessionImage from "../../assets/sample_session.png";
|
||||
import SessionCard from "../../component/session-card/session-card";
|
||||
import sampleVideoImage from "../../assets/sample_session.png";
|
||||
import VideoCard from "../../component/video-card/video-card";
|
||||
|
||||
// Define the types for your navigation stack
|
||||
type SessionStackParamList = {
|
||||
Session: undefined; // Add other screens as needed
|
||||
type VideoStackParamList = {
|
||||
Video: undefined; // Add other screens as needed
|
||||
};
|
||||
|
||||
type SessionFeedNavigationProp = StackNavigationProp<
|
||||
SessionStackParamList,
|
||||
"Session"
|
||||
type VideoFeedNavigationProp = StackNavigationProp<
|
||||
VideoStackParamList,
|
||||
"Video"
|
||||
>;
|
||||
|
||||
// Define the props for SessionFeed component
|
||||
interface SessionFeedProps {
|
||||
navigation: SessionFeedNavigationProp;
|
||||
// Define the props for VideoFeed component
|
||||
interface VideoFeedProps {
|
||||
navigation: VideoFeedNavigationProp;
|
||||
}
|
||||
const SessionFeed: React.FC<SessionFeedProps> = ({ navigation }) => {
|
||||
const VideoFeed: React.FC<VideoFeedProps> = ({ navigation }) => {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<TouchableOpacity onPress={() => navigation.push("Session")}>
|
||||
<SessionCard
|
||||
<TouchableOpacity onPress={() => navigation.push("Video")}>
|
||||
<VideoCard
|
||||
playerName="Dean Machine"
|
||||
location="Family Billiards, San Francisco"
|
||||
gameType="Straight Pool"
|
||||
@ -30,8 +30,8 @@ const SessionFeed: React.FC<SessionFeedProps> = ({ navigation }) => {
|
||||
medianRun="7.3"
|
||||
duration="5:03:10"
|
||||
shotPacing="0:00:26"
|
||||
imageURL={sampleSessionImage}
|
||||
sessionName="Dusting off the chalk"
|
||||
imageURL={sampleVideoImage}
|
||||
videoName="Dusting off the chalk"
|
||||
lastPlayed="Today at 2:37pm"
|
||||
profileImageURL="https://www.pngall.com/wp-content/uploads/5/Profile-PNG-File.png"
|
||||
locationIconURL="https://www.shutterstock.com/image-vector/blank-map-marker-vector-illustration-260nw-1150566347.jpg"
|
||||
@ -49,4 +49,4 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
export default SessionFeed;
|
||||
export default VideoFeed;
|
Loading…
Reference in New Issue
Block a user