From 184f6e761e65ef06f57385c64e34e3029b473aae Mon Sep 17 00:00:00 2001 From: cindykandie Date: Mon, 23 Sep 2024 17:43:45 +0300 Subject: [PATCH] Fix formating issues --- app/(tabs)/speakers/[id].tsx | 30 ++++++++++++++++++++-------- app/(tabs)/speakers/_layout.tsx | 2 +- components/SpeakerCard.tsx | 4 +++- components/Speakers.tsx | 2 +- components/headers/SpeakerHeader.tsx | 2 +- 5 files changed, 28 insertions(+), 12 deletions(-) diff --git a/app/(tabs)/speakers/[id].tsx b/app/(tabs)/speakers/[id].tsx index 566a8fc..8aa28b0 100644 --- a/app/(tabs)/speakers/[id].tsx +++ b/app/(tabs)/speakers/[id].tsx @@ -21,7 +21,11 @@ const SpeakerPage = () => { } if (error || !speaker) { - return Speaker not found; + return ( + + Speaker not found + + ); } const toggleSaveSession = (sessionIndex: number) => { @@ -32,9 +36,16 @@ const SpeakerPage = () => { }; const socialMediaLinks = [ - { name: 'twitter', url: speaker.socialMedia?.twitter || 'https://x.com/renderconke', icon: require('@/assets/images/x.png') }, - { name: 'linkedin', url: speaker.socialMedia?.linkedin || 'https://www.linkedin.com/company/renderconke/', icon: require('@/assets/images/linkedin.png') - }, + { + name: 'twitter', + url: speaker.socialMedia?.twitter || 'https://x.com/renderconke', + icon: require('@/assets/images/x.png'), + }, + { + name: 'linkedin', + url: speaker.socialMedia?.linkedin || 'https://www.linkedin.com/company/renderconke/', + icon: require('@/assets/images/linkedin.png'), + }, ]; return ( @@ -45,12 +56,16 @@ const SpeakerPage = () => { - - + + {speaker.bio} - + {socialMediaLinks.map((social, index) => ( Linking.openURL(social.url)} style={styles.socialIconImage}> @@ -90,7 +105,6 @@ const styles = StyleSheet.create({ padding: 16, justifyContent: 'center', marginTop: 30, - }, backButton: { position: 'absolute', diff --git a/app/(tabs)/speakers/_layout.tsx b/app/(tabs)/speakers/_layout.tsx index ab62cb7..09137cd 100644 --- a/app/(tabs)/speakers/_layout.tsx +++ b/app/(tabs)/speakers/_layout.tsx @@ -3,7 +3,7 @@ import { Stack } from 'expo-router'; export default function TabLayout() { return ( - + = ({ speaker }) => { ) : ( - No Image + + No Image + )} diff --git a/components/Speakers.tsx b/components/Speakers.tsx index 27b6da8..bf09bd6 100644 --- a/components/Speakers.tsx +++ b/components/Speakers.tsx @@ -39,7 +39,7 @@ const styles = StyleSheet.create({ }, header: { marginBottom: 16, - color: palette.palette.secondary // Removed font size and color since StyledText handles that + color: palette.palette.secondary, // Removed font size and color since StyledText handles that }, error: { textAlign: 'center', diff --git a/components/headers/SpeakerHeader.tsx b/components/headers/SpeakerHeader.tsx index f8b6e7f..c0e4a74 100644 --- a/components/headers/SpeakerHeader.tsx +++ b/components/headers/SpeakerHeader.tsx @@ -31,7 +31,7 @@ const styles = StyleSheet.create({ }, name: { marginBottom: 8, - color: palette.palette.secondary + color: palette.palette.secondary, }, image: { width: 150,