Skip to content

Commit

Permalink
Fix formating issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kandiecindy committed Sep 23, 2024
1 parent e555803 commit 184f6e7
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 12 deletions.
30 changes: 22 additions & 8 deletions app/(tabs)/speakers/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ const SpeakerPage = () => {
}

if (error || !speaker) {
return <StyledText variant="error" style={styles.error}>Speaker not found</StyledText>;
return (
<StyledText variant="error" style={styles.error}>
Speaker not found
</StyledText>
);
}

const toggleSaveSession = (sessionIndex: number) => {
Expand All @@ -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 (
Expand All @@ -45,12 +56,16 @@ const SpeakerPage = () => {
<FontAwesome name="arrow-left" size={18} color={palette.palette.secondary} />
</TouchableOpacity>

<SpeakerHeader name={speaker.fullName} occupation={speaker.occupation} profilePicture={speaker.profilePicture} />

<SpeakerHeader
name={speaker.fullName}
occupation={speaker.occupation}
profilePicture={speaker.profilePicture}
/>

<StyledText size="md" variant="text" style={styles.bio}>
{speaker.bio}
</StyledText>

<View style={styles.socialMediaContainer}>
{socialMediaLinks.map((social, index) => (
<TouchableOpacity key={index} onPress={() => Linking.openURL(social.url)} style={styles.socialIconImage}>
Expand Down Expand Up @@ -90,7 +105,6 @@ const styles = StyleSheet.create({
padding: 16,
justifyContent: 'center',
marginTop: 30,

},
backButton: {
position: 'absolute',
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 screenOptions={{ headerShown: false }}>
<Stack.Screen
name="[id]"
options={{
Expand Down
4 changes: 3 additions & 1 deletion components/SpeakerCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ const SpeakerCard: React.FC<SpeakerCardProps> = ({ speaker }) => {
<Image source={{ uri: speaker.profilePicture }} style={styles.image} resizeMode="cover" />
) : (
<View style={styles.imageFallback}>
<StyledText size="xs" font="light" style={styles.imageFallbackText}>No Image</StyledText>
<StyledText size="xs" font="light" style={styles.imageFallbackText}>
No Image
</StyledText>
</View>
)}
<View style={styles.textContainer}>
Expand Down
2 changes: 1 addition & 1 deletion components/Speakers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion components/headers/SpeakerHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const styles = StyleSheet.create({
},
name: {
marginBottom: 8,
color: palette.palette.secondary
color: palette.palette.secondary,
},
image: {
width: 150,
Expand Down

0 comments on commit 184f6e7

Please sign in to comment.