Skip to content

Commit

Permalink
done merge
Browse files Browse the repository at this point in the history
  • Loading branch information
philipye314 committed Dec 8, 2024
2 parents 68440e2 + 14c6864 commit 08e080d
Show file tree
Hide file tree
Showing 11 changed files with 206 additions and 294 deletions.
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"web": {
"favicon": "./assets/bp-favicon.png"
},
"plugins": ["expo-font"]
"plugins": ["expo-font", "expo-video"]
}
}
197 changes: 15 additions & 182 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,17 @@
"@rneui/base": "^4.0.0-rc.7",
"@rneui/themed": "^4.0.0-rc.8",
"@supabase/supabase-js": "^2.45.6",
"debug": "^4.3.7",
"expo": "^52.0.5",
"expo-av": "~15.0.1",
"expo-status-bar": "~2.0.0",
"metro-config": "^0.81.0",
"react": "18.3.1",
"expo-video": "~2.0.2",
"react": "^18.3.1",
"react-native": "0.76.1",
"react-native-dotenv": "^3.4.11",
"react-native-elements": "^3.4.3",
"react-native-gesture-handler": "^2.21.1",
"react-native-gesture-handler": "^2.21.2",
"react-native-media-controls": "^2.3.0",
"react-native-paper": "^5.12.5",
"react-native-reanimated": "^3.16.1",
Expand Down
34 changes: 34 additions & 0 deletions src/components/LegalRightsItem/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from 'react';
import { Image, Pressable, Text, View } from 'react-native';
import placeholderPoster from '@/assets/images/placeholder.png';
import { getPosterLink } from '@/supabase/queries/storageQueries';
import { VideoSectionItemProps } from '@/types/types';
import { styles } from './styles';

export default function LegalRightsItem({
section,
onPress,
}: VideoSectionItemProps) {
const language = section.spanish ? 'spanish' : 'english';

return (
<Pressable
style={styles.preaModule}
onPress={() => onPress(section.page_number, language)}
>
<Image
style={styles.modulePoster}
source={
getPosterLink(language, section.video_id)
? { uri: getPosterLink(language, section.video_id)! }
: placeholderPoster
}
/>
<View style={{ flex: 1 }}>
<Text style={styles.moduleTitle} numberOfLines={2}>
{section.title}
</Text>
</View>
</Pressable>
);
}
24 changes: 24 additions & 0 deletions src/components/LegalRightsItem/styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { StyleSheet } from 'react-native';

export const styles = StyleSheet.create({
preaModule: {
flex: 1,
margin: 5,
alignSelf: 'stretch',
},

modulePoster: {
width: '100%',
aspectRatio: 3 / 2,
borderRadius: 10,
},

moduleTitle: {
paddingTop: 10,
fontSize: 20,
fontWeight: '600',
flexWrap: 'wrap',
width: '100%',
flexShrink: 1,
},
});
5 changes: 0 additions & 5 deletions src/screens/LegalRights/LegalRightsScreen.tsx

This file was deleted.

Loading

0 comments on commit 08e080d

Please sign in to comment.