|
|
@ -1,11 +1,10 @@
|
|
|
|
|
|
|
|
import Text from "@/components/ui/Text";
|
|
|
|
import { Workout } from "@/model/Workout";
|
|
|
|
import { Workout } from "@/model/Workout";
|
|
|
|
|
|
|
|
import { useWorkoutStore } from "@/store/workoutStore";
|
|
|
|
import { AntDesign, MaterialCommunityIcons } from "@expo/vector-icons";
|
|
|
|
import { AntDesign, MaterialCommunityIcons } from "@expo/vector-icons";
|
|
|
|
import { useRouter } from "expo-router";
|
|
|
|
import { useRouter } from "expo-router";
|
|
|
|
import React from "react";
|
|
|
|
import React from "react";
|
|
|
|
import Text from "@/components/ui/Text"
|
|
|
|
|
|
|
|
import { ImageBackground, TouchableOpacity, View } from "react-native";
|
|
|
|
import { ImageBackground, TouchableOpacity, View } from "react-native";
|
|
|
|
import {useWorkoutStore} from "@/store/workoutStore";
|
|
|
|
|
|
|
|
import {getState} from "jest-circus";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
interface WorkoutCardComponentProps {
|
|
|
|
interface WorkoutCardComponentProps {
|
|
|
|
exercise?: Workout;
|
|
|
|
exercise?: Workout;
|
|
|
@ -13,8 +12,9 @@ interface WorkoutCardComponentProps {
|
|
|
|
height?: number;
|
|
|
|
height?: number;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export default function WorkoutCardComponent({exercise}: WorkoutCardComponentProps) {
|
|
|
|
export default function WorkoutCardComponent({
|
|
|
|
|
|
|
|
exercise,
|
|
|
|
|
|
|
|
}: WorkoutCardComponentProps) {
|
|
|
|
const router = useRouter();
|
|
|
|
const router = useRouter();
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<View className="h-full rounded-2xl overflow-hidden bg-black">
|
|
|
|
<View className="h-full rounded-2xl overflow-hidden bg-black">
|
|
|
@ -61,7 +61,7 @@ export default function WorkoutCardComponent({exercise}: WorkoutCardComponentPro
|
|
|
|
if (exercise) {
|
|
|
|
if (exercise) {
|
|
|
|
useWorkoutStore.getState().setWorkout(exercise);
|
|
|
|
useWorkoutStore.getState().setWorkout(exercise);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
router.push('/WorkoutDetailScreen');
|
|
|
|
router.push("/WorkoutDetailScreen");
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<AntDesign name="play" size={50} color="orange" />
|
|
|
|
<AntDesign name="play" size={50} color="orange" />
|
|
|
|