Floating video
This commit is contained in:
+14
-8
@@ -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"
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user