Floating video

This commit is contained in:
Adolfo Reyna
2023-01-08 22:15:43 -05:00
parent caf2a8ee04
commit 05d05f79f7
6 changed files with 140 additions and 13 deletions

View File

@@ -1,7 +1,6 @@
import React, { useEffect } from "react";
import { Searchbar } from 'react-native-paper';
import { ScrollView, ActivityIndicator, StyleSheet, SafeAreaView, FlatList } from 'react-native';
import { Title } from 'react-native-paper';
import { Searchbar, Title } from 'react-native-paper';
import { ScrollView, ActivityIndicator, StyleSheet, SafeAreaView, FlatList, View } from 'react-native';
import API from "../API";
import CourseCard from "../components/CourseCard";
import { useSnapshot } from 'valtio';
@@ -134,8 +133,8 @@ const Courses = () => {
<ScrollView>
{
watching.length ?
<>
<Title>{i18n.t("message.continueWatching")}:</Title>
<View>
<Title style={styles.title} >{i18n.t("message.continueWatching")}:</Title>
<FlatList
horizontal={true}
data={watching}
@@ -143,12 +142,12 @@ const Courses = () => {
keyExtractor={item => item.profile._id}
initialNumToRender={2}
/>
</> : <></>
</View> : <></>
}
{
groups.length ?
<>
<Title>{i18n.t("message.recentlyAdded")}:</Title>
<Title style={styles.title} >{i18n.t("message.recentlyAdded")}:</Title>
<FlatList
horizontal={true}
data={groups}
@@ -161,7 +160,7 @@ const Courses = () => {
{
popular.length ?
<>
<Title>{i18n.t("message.popularCourses")}:</Title>
<Title style={styles.title} >{i18n.t("message.popularCourses")}:</Title>
<FlatList
horizontal={true}
data={popular}
@@ -182,4 +181,11 @@ const styles = StyleSheet.create({
container: {
flex: 1
},
title: {
padding: 10,
fontSize: 30,
marginTop: 15,
fontWeight: "bold",
color: "#777"
}
});