Skip to content

Commit

Permalink
speaker page and speakers
Browse files Browse the repository at this point in the history
  • Loading branch information
kharioki committed Sep 23, 2024
1 parent 62a0ed3 commit 5572b88
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 81 deletions.
2 changes: 1 addition & 1 deletion app/(tabs)/home/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function TabLayout() {
<Tabs
screenOptions={{
tabBarStyle: {
backgroundColor: Colors.palette.primary + '80',
backgroundColor: Colors.palette.primary + 'cc',
borderTopColor: 'transparent',
position: 'absolute',
bottom: 0,
Expand Down
16 changes: 14 additions & 2 deletions app/(tabs)/home/speakers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ const Speakers = () => {
const { speakerList, loading, error } = useFetchSpeakers();

return (
<MainContainer backgroundImage={require('@/assets/images/bg.png')} ImageBackgroundProps={{ resizeMode: 'cover' }}>
<MainContainer
backgroundImage={require('@/assets/images/bg.png')}
ImageBackgroundProps={{ resizeMode: 'cover' }}
preset="fixed"
safeAreaEdges={['top']}
>
<View style={styles.container}>
<StyledText size="xl" font="semiBold" style={styles.header}>
Speakers
Expand All @@ -30,6 +35,11 @@ const Speakers = () => {
<SpeakerCard speaker={item} onPress={() => router.push(`/speakers/${item.id}`)} />
)}
keyExtractor={(item) => item.id}
getItemLayout={(_, index) => ({
length: 100,
offset: 100 * index,
index,
})}
/>
)}
</View>
Expand All @@ -40,7 +50,9 @@ const Speakers = () => {
const styles = StyleSheet.create({
container: {
flex: 1,
padding: 16,
paddingTop: sizes.header,
paddingHorizontal: sizes.md,
paddingBottom: sizes.md,
},
header: {
color: Colors.palette.secondary,
Expand Down
8 changes: 6 additions & 2 deletions app/(tabs)/speakers/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ const SpeakerPage = () => {
};

return (
<MainContainer backgroundImage={require('@/assets/images/bg.png')} ImageBackgroundProps={{ resizeMode: 'cover' }}>
<MainContainer
backgroundImage={require('@/assets/images/bg.png')}
ImageBackgroundProps={{ resizeMode: 'cover' }}
preset="scroll"
safeAreaEdges={['top']}
>
<View style={styles.container}>
<View style={styles.header}>
<Pressable
Expand Down Expand Up @@ -115,7 +120,6 @@ const styles = StyleSheet.create({
error: {
color: Colors.palette.error,
textAlign: 'center',
marginTop: 20,
},
header: {
width: '100%',
Expand Down
2 changes: 1 addition & 1 deletion app/(tabs)/speakers/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Stack } from 'expo-router';

export default function TabLayout() {
return (
<Stack screenOptions={{ headerShown: false }}>
<Stack>
<Stack.Screen
name="[id]"
options={{
Expand Down
Binary file removed assets/images/linkedin.png
Binary file not shown.
Binary file removed assets/images/x.png
Binary file not shown.
27 changes: 0 additions & 27 deletions components/containers/BackgroundWrapper.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion components/containers/MainContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const MainContainer = (props: ScreenProps) => {
const styles = StyleSheet.create({
container: {
flex: 1,
paddingTop: Platform.OS === 'android' ? 60 : 40,
// paddingTop: Platform.OS === 'android' ? 60 : 40,
},
containerStyle: {
width: '100%',
Expand Down
47 changes: 0 additions & 47 deletions components/headers/SpeakerHeader.tsx

This file was deleted.

1 change: 1 addition & 0 deletions constants/Styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const sizes = {
xl: 26,
xxl: 32,
xxxl: 40,
header: 60,
card: 220,
cardImage: 150,
} as const;
Expand Down

0 comments on commit 5572b88

Please sign in to comment.