Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
EXPO_PUBLIC_ADMIN_ID=
EXPO_PUBLIC_ADMIN_PASSWORD=
EXPO_PUBLIC_ADMIN_PASSWORD=
EXPO_PUBLIC_SUPABASE_URL=
EXPO_PUBLIC_SUPABASE_ANON_KEY=
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# dependencies
node_modules/

.env
# Expo
.expo/
dist/
Expand Down
5 changes: 3 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"plugins": [
"expo-router",
[
"expo-splash-screen",{
"expo-splash-screen",
{
"backgroundColor": "#FFFFFF",
"resizeMode": "contain",
"image": "./assets/images/bird-logo.png",
Expand Down Expand Up @@ -64,7 +65,7 @@
"origin": false
},
"eas": {
"projectId": "035efa62-7a9a-42a2-bf65-aee321fba071"
"projectId": "0a89ff9f-141b-4259-a757-6b6c1e8d398c"
}
}
}
Expand Down
108 changes: 56 additions & 52 deletions app/(tabs)/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ const VideoList = () => {
textStyle={{ fontSize: 11 }}
arrowIconStyle={{ marginHorizontal: -5 }}
/>

{/* REVERTED THIS CHANGE AS PER FEEDBACK
Changed 'onPress' back to 'onLongPress' and added delay
*/}
<TouchableOpacity className="w-[100px] h-[70px] flex-1" onLongPress={() => router.push(`/login`)} delayLongPress={5000}>
<Image source={billion_readers} className="w-full h-full"
style={{ resizeMode: "contain" }}
Expand All @@ -230,60 +234,60 @@ const VideoList = () => {
</View>

{
loading ? (
<FlatList
data={[1, 2, 3, 4]}
keyExtractor={(item) => item.toString()}
renderItem={() => (
<View className="flex flex-row justify-between p-4 border-b-[1px] border-gray-100 h-[130px]">
<View className="bg-gray-100 w-[45%] h-[100px] rounded" />
<View className="w-[50%] pl-2 justify-between">
<View className="bg-gray-100 h-5 w-3/4 rounded mb-2" />
<View className="bg-gray-100 h-5 w-1/2 rounded" />
</View>
</View>
)}
/>
) : (<View>
<FlatList
contentContainerStyle={{ paddingBottom: 140 }}
data={videoDetails.filter(item => level === "all" || item.level === level)}
keyExtractor={(item) => item.id}
renderItem={({ item }) => (
<View className="flex flex-row items-cente justify-between p-2 border-b-[1px] border-gray-300 h-fit min-h-[130px]">
<TouchableOpacity
className="w-[45%]"
onPress={() => handleVideoPress(item)}
>
<Image
source={videoLanguages[item.id] === "en" ? item.thumbnail_en : item.thumbnail_punjabi}
className="h-[100px] w-full"
style={styles.thumbnail}
/>
</TouchableOpacity>

{/* Video Details along with pdf and translation option */}
<View className="flex w-[55%] pl-2 justify-between items-start h-[97px]">
<Text className="text-white text-left text-xl w-full font-bold break-words">
{videoLanguages[item.id] === "en" ? item.english_title : item.punjabi_title}
</Text>
<View className="flex gap-2 flex-row">
<TouchableOpacity
onPress={() => toggleVideoLanguage(item.id)}
className="bg-white p-2.5 rounded-full">
<Image className="w-6 h-6" source={translate_img} style={{ tintColor: 'black' }} />
</TouchableOpacity>
<TouchableOpacity
onPress={()=>handlePdfPress(item)}
className="bg-white p-2.5 rounded-full">
<Image className="w-6 h-6" source={pdf_img} style={{ tintColor: 'black' }} />
</TouchableOpacity>
loading ? (
<FlatList
data={[1, 2, 3, 4]}
keyExtractor={(item) => item.toString()}
renderItem={() => (
<View className="flex flex-row justify-between p-4 border-b-[1px] border-gray-100 h-[130px]">
<View className="bg-gray-100 w-[45%] h-[100px] rounded" />
<View className="w-[50%] pl-2 justify-between">
<View className="bg-gray-100 h-5 w-3/4 rounded mb-2" />
<View className="bg-gray-100 h-5 w-1/2 rounded" />
</View>
</View>
</View>
)}
/>
</View>
)}
/>
) : (<View>
<FlatList
contentContainerStyle={{ paddingBottom: 140 }}
data={videoDetails.filter(item => level === "all" || item.level === level)}
keyExtractor={(item) => item.id}
renderItem={({ item }) => (
<View className="flex flex-row items-cente justify-between p-2 border-b-[1px] border-gray-300 h-fit min-h-[130px]">
<TouchableOpacity
className="w-[45%]"
onPress={() => handleVideoPress(item)}
>
<Image
source={videoLanguages[item.id] === "en" ? item.thumbnail_en : item.thumbnail_punjabi}
className="h-[100px] w-full"
style={styles.thumbnail}
/>
</TouchableOpacity>

{/* Video Details along with pdf and translation option */}
<View className="flex w-[55%] pl-2 justify-between items-start h-[97px]">
<Text className="text-white text-left text-xl w-full font-bold break-words">
{videoLanguages[item.id] === "en" ? item.english_title : item.punjabi_title}
</Text>
<View className="flex gap-2 flex-row">
<TouchableOpacity
onPress={() => toggleVideoLanguage(item.id)}
className="bg-white p-2.5 rounded-full">
<Image className="w-6 h-6" source={translate_img} style={{ tintColor: 'black' }} />
</TouchableOpacity>
<TouchableOpacity
onPress={()=>handlePdfPress(item)}
className="bg-white p-2.5 rounded-full">
<Image className="w-6 h-6" source={pdf_img} style={{ tintColor: 'black' }} />
</TouchableOpacity>
</View>
</View>
</View>
)}
/>
</View>
)}
</View>
);
Expand Down
Loading