parent
ddb53778fc
commit
faebac7ca5
@ -1,13 +1,40 @@
|
|||||||
import {SafeAreaView, Text, View} from "react-native";
|
import {FlatList, Text, View} from "react-native";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import HeaderProfileComponent from "@/components/HeaderProfileComponent";
|
||||||
|
import Screen from "@/components/ui/Screen";
|
||||||
|
import WorkoutCardComponent from "@/components/WorkoutCardComponent";
|
||||||
|
import {useSession} from "@/ctx";
|
||||||
|
import {Workout} from "@/model/Workout";
|
||||||
|
|
||||||
export default function ExerciceScreen() {
|
export default function ExerciceScreen() {
|
||||||
|
const [text, onChangeText] = React.useState("");
|
||||||
|
const exercise = [new Workout("Développé couché", 25,"8 Series Workout", 412, "assets/images/Sigma-2.png","Intense" ),
|
||||||
|
new Workout("Curl halterné", 30, "8 Series Workout", 342, "assets/images/Sigma.jpg","Medium" ),
|
||||||
|
new Workout("Tirage Vertival", 29, "8 Series Workout", 793, "assets/images/Sigma.jpg","Easy" )];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SafeAreaView>
|
<Screen>
|
||||||
|
<FlatList
|
||||||
|
ListHeaderComponent={
|
||||||
|
<>
|
||||||
<View>
|
<View>
|
||||||
<Text className="m-7 font-extrabold">Welcome to Exercice Screen </Text>
|
<HeaderProfileComponent/>
|
||||||
<Text>We will do it soon</Text>
|
</View>
|
||||||
|
<View className="mt-4">
|
||||||
|
<View className="flex-row justify-between items-center mb-4">
|
||||||
|
<Text className="text-lg font-bold text-black">Séance du jour</Text>
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</SafeAreaView>
|
</>
|
||||||
|
}
|
||||||
|
data={exercise}
|
||||||
|
className="h-full"
|
||||||
|
renderItem={({ item }: { item: Workout }) =>
|
||||||
|
<View className="mt-2 h-52">
|
||||||
|
<WorkoutCardComponent exercise={item}/>
|
||||||
|
</View>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Screen>
|
||||||
);
|
);
|
||||||
}
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 108 KiB |
After Width: | Height: | Size: 258 KiB |
@ -0,0 +1,28 @@
|
|||||||
|
import {Image, Text, TouchableOpacity, View} from "react-native";
|
||||||
|
import {Ionicons} from "@expo/vector-icons";
|
||||||
|
import React from "react";
|
||||||
|
import {useSession} from "@/ctx";
|
||||||
|
|
||||||
|
export default function HeaderProfileComponent() {
|
||||||
|
const {session} = useSession();
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View className="rounded-2xl overflow-hidden shadow-lg h-auto p-4">
|
||||||
|
|
||||||
|
<View className="flex-row items-center justify-between">
|
||||||
|
<View className="flex-row items-center w-full">
|
||||||
|
<Image className="h-16 w-16 rounded-2xl"
|
||||||
|
source={require("assets/images/sigma-profile.jpeg")}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<View>
|
||||||
|
<Text className="text-gray-500 font-semibold ml-4">Prêt pour t'entrainer ?</Text>
|
||||||
|
<Text className="text-black text-4xl ml-4 mt-0.5">{session}</Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
Loading…
Reference in new issue