Skip to content

Commit c01ee39

Browse files
committed
Finalize to upload on github
1 parent a15c750 commit c01ee39

14 files changed

+248
-1031
lines changed

src/Modules/CreditCard.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Screens/About.js

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const SocialLink = props => {
2929
size={iconSize ? iconSize : 20}
3030
/>
3131
<Text
32+
// eslint-disable-next-line react-native/no-inline-styles
3233
style={{
3334
...styles.link,
3435
color: type === 'logo' || type === 'url' ? '#1568d6' : '#212121',

src/Screens/AboutUs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import {StyleSheet, useWindowDimensions} from 'react-native';
3-
import RenderHTML, {defaultSystemFonts} from 'react-native-render-html';
3+
import RenderHTML from 'react-native-render-html';
44
import {ScrollView} from 'react-native-gesture-handler';
55

66
const AboutUs = props => {

src/Screens/Channel.js

+58-45
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,45 @@ const ChannelScreen = props => {
5656
});
5757
});
5858

59+
const ItemComp = ({item, index}) => {
60+
return (
61+
<Pressable
62+
onPress={() =>
63+
props.navigation.navigate('Player', {
64+
videoIndex: index,
65+
})
66+
}
67+
style={styles.videoContainer}>
68+
<Image
69+
source={{
70+
uri: item?.thumb,
71+
}}
72+
resizeMode="cover"
73+
style={styles.thumbnail}
74+
/>
75+
<View style={styles.detailContainer}>
76+
<View style={styles.titleContainer}>
77+
<Text style={styles.videoTitle} numberOfLines={2}>
78+
{item?.title}
79+
</Text>
80+
<Text style={styles.videoDescription} numberOfLines={2}>
81+
{`${item?.views} views . ${
82+
item?.uploaded === 'just now'
83+
? 'just now'
84+
: `${item?.uploaded} ago`
85+
}`}
86+
</Text>
87+
</View>
88+
<TouchableOpacity>
89+
<Icon name="ellipsis-vertical" size={14} color="#6c6c6c" />
90+
</TouchableOpacity>
91+
</View>
92+
</Pressable>
93+
);
94+
};
95+
5996
return (
60-
<View style={{flex: 1}}>
97+
<View style={styles.mainContainer}>
6198
<VirtualizedList
6299
data={HomeData}
63100
getItemCount={() => HomeData.length}
@@ -67,7 +104,7 @@ const ChannelScreen = props => {
67104
<View>
68105
<Image
69106
source={{uri: ChannelData[0]?.cover}}
70-
style={{width: '100%', height: 154}}
107+
style={styles.cover}
71108
resizeMode="contain"
72109
/>
73110
<Image
@@ -115,50 +152,9 @@ const ChannelScreen = props => {
115152
);
116153
}}
117154
initialNumToRender={5}
118-
renderItem={({item, index}) => {
119-
return (
120-
<Pressable
121-
onPress={() =>
122-
props.navigation.navigate('Player', {
123-
videoIndex: index,
124-
})
125-
}
126-
style={{
127-
flexDirection: 'row',
128-
marginHorizontal: 8,
129-
marginVertical: 4,
130-
width: '100%',
131-
alignItems: 'flex-start',
132-
}}>
133-
<Image
134-
source={{
135-
uri: `http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/${item?.thumb}`,
136-
}}
137-
resizeMode="cover"
138-
style={styles.thumbnail}
139-
/>
140-
<View style={styles.detailContainer}>
141-
<View style={styles.titleContainer}>
142-
<Text style={styles.videoTitle} numberOfLines={2}>
143-
{item?.title}
144-
</Text>
145-
<Text style={styles.videoDescription} numberOfLines={2}>
146-
{`${item?.views} views . ${
147-
item?.uploaded === 'just now'
148-
? 'just now'
149-
: `${item?.uploaded} ago`
150-
}`}
151-
</Text>
152-
</View>
153-
<TouchableOpacity>
154-
<Icon name="ellipsis-vertical" size={14} color="#6c6c6c" />
155-
</TouchableOpacity>
156-
</View>
157-
</Pressable>
158-
);
159-
}}
155+
renderItem={ItemComp}
160156
ListFooterComponent={() => {
161-
return <View style={{height: 80}} />;
157+
return <View style={styles.listFooter} />;
162158
}}
163159
keyExtractor={(item, index) => index.toString()}
164160
/>
@@ -189,6 +185,9 @@ const styles = StyleSheet.create({
189185
flex: 1,
190186
backgroundColor: '#fff',
191187
},
188+
mainContainer: {
189+
flex: 1,
190+
},
192191
modal: {
193192
justifyContent: 'flex-end',
194193
margin: 0,
@@ -221,6 +220,10 @@ const styles = StyleSheet.create({
221220
height: '34%',
222221
resizeMode: 'contain',
223222
},
223+
cover: {
224+
width: '100%',
225+
height: 154,
226+
},
224227
headerRight: {
225228
flexDirection: 'row',
226229
alignItems: 'center',
@@ -326,6 +329,16 @@ const styles = StyleSheet.create({
326329
fontFamily: 'Roboto-Medium',
327330
fontSize: 12,
328331
},
332+
videoContainer: {
333+
flexDirection: 'row',
334+
marginHorizontal: 8,
335+
marginVertical: 4,
336+
width: '100%',
337+
alignItems: 'flex-start',
338+
},
339+
listFooter: {
340+
height: 30,
341+
},
329342
});
330343

331344
export default ChannelScreen;

src/Screens/Earnings.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const Earnings = props => {
7070
setDatePicker(false);
7171
};
7272

73-
const PaypalContent = props => {
73+
const PaypalContent = paypalProps => {
7474
return (
7575
<View>
7676
<Text style={styles.month}>
@@ -111,7 +111,7 @@ const Earnings = props => {
111111
);
112112
};
113113

114-
const BankTransfer = props => {
114+
const BankTransfer = bankProps => {
115115
const filtered = Countries.filter(c => c.code === selectedCountry);
116116
const link = `${flagLink + filtered[0]?.code}.png`;
117117
return (

src/Screens/Explore.js

+39-27
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,18 @@ const Explore = props => {
5353
const trendedVideo = Videos[randomInt];
5454
const slicedData = Videos.slice(0, 6);
5555

56-
const TrendingItems = ({item}) => {
56+
const TrendingItems = ({item, index}) => {
5757
return (
5858
<VideoTile
5959
title={item?.title}
6060
channel={item?.channel}
6161
thumbnail={item?.thumb}
6262
views={item?.views}
63+
onPress={() =>
64+
props.navigation.navigate('Player', {
65+
videoIndex: index,
66+
})
67+
}
6368
onChannelPress={() =>
6469
props.navigation.navigate('ChannelScreen', {
6570
channelName: item?.channel,
@@ -84,33 +89,40 @@ const Explore = props => {
8489
<ScrollView
8590
style={styles.container}
8691
contentContainerStyle={styles.contentContainer}>
87-
<ImageBackground
88-
source={{
89-
uri: trendedVideo?.thumb,
90-
}}
91-
resizeMode="cover"
92-
style={styles.trendThumb}
93-
onLoad={() => setThumbLoading(false)}>
94-
{thumbLoading && <ActivityIndicator size="large" color="#fff" />}
95-
<View style={styles.overlay} />
96-
<View style={styles.trendContainer}>
97-
<View style={styles.row}>
98-
<Image
99-
source={{
100-
uri: 'https://s3.envato.com/files/335035895/thumbnail.png',
101-
}}
102-
style={styles.trendAvtar}
103-
resizeMode="cover"
104-
/>
105-
<Text style={styles.channelName}>{trendedVideo?.channel}</Text>
92+
<Pressable
93+
onPress={() =>
94+
props.navigation.navigate('Player', {
95+
videoIndex: randomInt,
96+
})
97+
}>
98+
<ImageBackground
99+
source={{
100+
uri: trendedVideo?.thumb,
101+
}}
102+
resizeMode="cover"
103+
style={styles.trendThumb}
104+
onLoad={() => setThumbLoading(false)}>
105+
{thumbLoading && <ActivityIndicator size="large" color="#fff" />}
106+
<View style={styles.overlay} />
107+
<View style={styles.trendContainer}>
108+
<View style={styles.row}>
109+
<Image
110+
source={{
111+
uri: 'https://s3.envato.com/files/335035895/thumbnail.png',
112+
}}
113+
style={styles.trendAvtar}
114+
resizeMode="cover"
115+
/>
116+
<Text style={styles.channelName}>{trendedVideo?.channel}</Text>
117+
</View>
118+
<Icon name="flame" size={28} color="#ff9f00" />
106119
</View>
107-
<Icon name="flame" size={28} color="#ff9f00" />
108-
</View>
109-
<View style={styles.trendTitleContainer}>
110-
<Text style={styles.trendedVideoTitle}>{trendedVideo?.title}</Text>
111-
<Text style={styles.channelName}>#trending</Text>
112-
</View>
113-
</ImageBackground>
120+
<View style={styles.trendTitleContainer}>
121+
<Text style={styles.trendedVideoTitle}>{trendedVideo?.title}</Text>
122+
<Text style={styles.channelName}>#trending</Text>
123+
</View>
124+
</ImageBackground>
125+
</Pressable>
114126
<View style={styles.videosContainer}>
115127
<IconText
116128
icon="flame"

src/Screens/Library.js

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
} from 'react-native';
1212
import Videos from '../Utils/HomeData.json';
1313
import Icon from 'react-native-vector-icons/Ionicons';
14-
import {Loader} from '../Modules';
1514

1615
const {height} = Dimensions.get('window');
1716

src/Screens/Settings.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,16 @@ const Settings = props => {
5050
</View>
5151
<Text style={styles.heading}>App</Text>
5252
<View style={styles.modeContainer}>
53-
<Option text="Downloads" icon="download-outline" />
53+
<Option
54+
text="Downloads"
55+
icon="download-outline"
56+
onPress={() =>
57+
props.navigation.navigate('VideosScreen', {
58+
screenName: 'Watch Later',
59+
listId: 1,
60+
})
61+
}
62+
/>
5463
</View>
5564
<Text style={styles.heading}>General</Text>
5665
<View style={styles.modeContainer}>

src/Screens/Signup.js

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
Text,
55
StyleSheet,
66
Image,
7-
TextInput,
87
ScrollView,
98
Pressable,
109
} from 'react-native';

src/Screens/User.js

+10-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {Description} from '../Screens/Channel';
1313
import {numberSeperator} from '../Utils/Util';
1414
import {LineChart, BarChart} from 'react-native-chart-kit';
1515
import {AllTimes, MonthLabels, WeekLabels} from '../Utils/Labes';
16-
import {heightPercentageToDP, widthPercentageToDP} from '../Utils/DpToPixel';
16+
import {widthPercentageToDP} from '../Utils/DpToPixel';
1717
import Icon from 'react-native-vector-icons/Ionicons';
1818
import {BottomModal, Button} from '../Modules';
1919
import {displayName} from '../../app.json';
@@ -30,7 +30,7 @@ const data = {
3030
const UserScreen = props => {
3131
const [viewData, setViewData] = useState('week');
3232
const [uploadModal, setUploadModal] = useState(false);
33-
const [noContent, setNoContent] = useState(true);
33+
const [noContent] = useState(false);
3434
const [loggedUser] = useState(true);
3535

3636
const chartConfig = {
@@ -86,7 +86,14 @@ const UserScreen = props => {
8686
contentContainerStyle={styles.contentContainer}>
8787
<Image source={{uri: UserData?.avtar}} style={styles.avtar} />
8888
<Text style={styles.name}>{UserData?.name}</Text>
89-
<Button title="Edit" />
89+
<Button
90+
title="Edit"
91+
onPress={() =>
92+
props.navigation.navigate('EditProfile', {
93+
channelName: UserData?.name,
94+
})
95+
}
96+
/>
9097
<View style={styles.channelDescription}>
9198
<Description
9299
head={numberSeperator(UserData?.totalFollowers)}

src/Screens/UserVideo.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ const UserVideo = props => {
214214
style={styles.videoContainer}>
215215
<Image
216216
source={{
217-
uri: `http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/${item?.thumb}`,
217+
uri: item?.thumb,
218218
}}
219219
resizeMode="cover"
220220
style={styles.thumbnail}
@@ -239,7 +239,9 @@ const UserVideo = props => {
239239
ItemSeparatorComponent={() => <View style={styles.seperator} />}
240240
/>
241241
<BottomModal scrollView isVisible={modal} dismiss={dismiss}>
242-
<ScrollView style={{flex: 1}} contentContainerStyle={{flexGrow: 1}}>
242+
<ScrollView
243+
style={styles.insightContainer}
244+
contentContainerStyle={styles.insightContent}>
243245
<View style={styles.heading}>
244246
<Text
245247
style={
@@ -375,6 +377,12 @@ const styles = StyleSheet.create({
375377
alignItems: 'center',
376378
width: '48%',
377379
},
380+
insightContainer: {
381+
flex: 1,
382+
},
383+
insightContent: {
384+
flexGrow: 1,
385+
},
378386
listVideoTitle: {
379387
color: '#282828',
380388
fontFamily: 'Roboto-Medium',

0 commit comments

Comments
 (0)