Skip to content

Commit 97c86f5

Browse files
author
Emily Sunaryo
committed
fixed preview card and basic author styling
1 parent 1688a4d commit 97c86f5

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

src/app/(tabs)/author/index.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import { SafeAreaView } from 'react-native-safe-area-context';
1212

1313
import styles from './styles';
1414
import Icon from '../../../../assets/icons';
15-
import ContentCard from '../../../components/ContentCard/ContentCard';
1615
import HorizontalLine from '../../../components/HorizontalLine/HorizontalLine';
16+
import PreviewCard from '../../../components/PreviewCard/PreviewCard';
1717
import {
1818
fetchAuthor,
1919
fetchAuthorStoryPreviews,
@@ -83,7 +83,9 @@ function AuthorScreen() {
8383
<Text style={styles.name}>
8484
{authorInfo ? authorInfo.name : ''}
8585
</Text>
86-
<Text>{authorInfo ? authorInfo.pronouns : ' '}</Text>
86+
<Text style={styles.pronouns}>
87+
{authorInfo ? authorInfo.pronouns : ' '}
88+
</Text>
8789
</View>
8890
<HorizontalLine />
8991

@@ -116,10 +118,16 @@ function AuthorScreen() {
116118

117119
{authorStoryPreview
118120
? authorStoryPreview.map(story => (
119-
<ContentCard
121+
<PreviewCard
122+
key={story.title}
120123
title={story.title}
121-
author={story.author_name}
122124
image={story.featured_media}
125+
author={story.author_name}
126+
authorImage={story.author_image}
127+
excerpt={story.excerpt}
128+
tags={story.genre_medium
129+
.concat(story.tone)
130+
.concat(story.topic)}
123131
pressFunction={() =>
124132
router.push({
125133
pathname: '/story',

src/app/(tabs)/author/styles.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ const styles = StyleSheet.create({
1212
name: {
1313
paddingTop: 15,
1414
fontWeight: 'bold',
15-
fontSize: 20,
15+
fontSize: 25,
1616
fontFamily: 'Avenir',
1717
},
1818
image: {
19-
height: 76,
20-
width: 84,
19+
height: 68,
20+
width: 68,
2121
backgroundColor: colors.darkGrey,
2222
borderRadius: 4,
2323
marginBottom: 12,
@@ -63,6 +63,9 @@ const styles = StyleSheet.create({
6363
paddingTop: 10,
6464
fontWeight: 'bold',
6565
},
66+
pronouns: {
67+
color: '#797979',
68+
},
6669
});
6770

6871
export default styles;

0 commit comments

Comments
 (0)