You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.7 KiB
59 lines
1.7 KiB
import { ExerciceDTO } from "@/api/service/dto/dto.training";
|
|
import LinearProgressBar from "@/components/LinearProgressBar";
|
|
import Screen from "@/components/ui/Screen";
|
|
import { Ionicons } from "@expo/vector-icons";
|
|
import { router, Router } from "expo-router";
|
|
import * as React from "react";
|
|
import { ImageBackground, Text, TouchableOpacity, View } from "react-native";
|
|
|
|
type WorkoutPresentationComponentProps = {
|
|
workout: ExerciceDTO;
|
|
dataExercise: ExerciceDTO[];
|
|
router: Router;
|
|
};
|
|
|
|
export default function WorkoutPresentationComponent({
|
|
workout,
|
|
}: Readonly<WorkoutPresentationComponentProps>) {
|
|
return (
|
|
<ImageBackground
|
|
className="h-full w-full"
|
|
source={require("assets/images/backgroundWourkout.jpg")}
|
|
>
|
|
<Screen>
|
|
<View className="flex-col h-full justify-between">
|
|
<View className="mt-5 ml-5">
|
|
<TouchableOpacity
|
|
onPress={() => {
|
|
router.replace("/ExercicesScreen");
|
|
}}
|
|
>
|
|
<Ionicons
|
|
name="chevron-back-circle-outline"
|
|
size={50}
|
|
color="white"
|
|
/>
|
|
</TouchableOpacity>
|
|
</View>
|
|
|
|
<View className="flex-grow" />
|
|
|
|
<View className="items-center mb-10">
|
|
<Text className="text-white bg-transparent border-2 border-white px-3 py-1 rounded-full text-2xl font-bold">
|
|
{workout.NbSet} x {workout.NbRep}
|
|
</Text>
|
|
|
|
<Text className="text-white text-4xl font-bold mt-2">
|
|
{workout.Name}
|
|
</Text>
|
|
</View>
|
|
|
|
<View className="mb-5">
|
|
<LinearProgressBar duration={workout.Duration} />
|
|
</View>
|
|
</View>
|
|
</Screen>
|
|
</ImageBackground>
|
|
);
|
|
}
|