import { View, Text, Image, Pressable, FlatList, Platform } from "react-native";
import { useNavigation } from "@react-navigation/native";
import tw from "tailwind-rn";
import { connect } from "react-redux";
//components
import Progress from "../../../components/Progress";
import Header from "../components/Header";
//style
import Colors from "../../../constants/Colors";
import fontSize from "../../../constants/fontSize";
const ios = Platform.OS === "ios";
function Videos({ videos, grades, mobile, theme }) {
return (
{videos.length ? (
<>
(
)}
keyExtractor={(item) => item.id}
/>
>
) : null}
);
}
const Video = ({ video, mobile, grades, theme }) => {
const navigation = useNavigation();
return (
navigation.navigate("Video", { id: video.id })}
>
{"دوره ویدئویی" + " " + video.name}
{"پایه" + " " + grades[video.gradeId]}
);
};
const mapStateToProps = (state) => ({
grades: state.publicApi.grades,
mobile: state.publicApi.mobile,
theme: state.publicApi.theme,
});
export default connect(mapStateToProps, {})(Videos);