diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/moments/MomentCommentPreview.tsx | 2 | ||||
-rw-r--r-- | src/components/moments/MomentPostContent.tsx | 2 | ||||
-rw-r--r-- | src/utils/comments.tsx | 22 |
3 files changed, 10 insertions, 16 deletions
diff --git a/src/components/moments/MomentCommentPreview.tsx b/src/components/moments/MomentCommentPreview.tsx index 092f8936..e53ed258 100644 --- a/src/components/moments/MomentCommentPreview.tsx +++ b/src/components/moments/MomentCommentPreview.tsx @@ -50,7 +50,7 @@ const MomentCommentPreview: React.FC<MomentCommentPreviewProps> = ({ {renderTextWithMentions({ value: commentPreview.comment, styles: styles.normalFont, - partTypes: mentionPartTypes('commentPreview'), + partTypes: mentionPartTypes('white'), onPress: (user: UserType) => navigateToProfile( state, diff --git a/src/components/moments/MomentPostContent.tsx b/src/components/moments/MomentPostContent.tsx index e43cba4f..aca2999c 100644 --- a/src/components/moments/MomentPostContent.tsx +++ b/src/components/moments/MomentPostContent.tsx @@ -112,7 +112,7 @@ const MomentPostContent: React.FC<MomentPostContentProps> = ({ renderTextWithMentions({ value: moment.caption, styles: styles.captionText, - partTypes: mentionPartTypes('momentCaption'), + partTypes: mentionPartTypes('white'), onPress: (user: UserType) => navigateToProfile( state, diff --git a/src/utils/comments.tsx b/src/utils/comments.tsx index 161ede0b..910b44e7 100644 --- a/src/utils/comments.tsx +++ b/src/utils/comments.tsx @@ -79,9 +79,9 @@ export const renderTextWithMentions: React.FC<RenderProps> = ({ ); }; -export const mentionPartTypes: ( - theme: 'blue' | 'momentCaption' | 'commentPreview', -) => PartType[] = (theme) => { +export const mentionPartTypes: (theme: 'blue' | 'white') => PartType[] = ( + theme, +) => { return [ { trigger: '@', @@ -93,27 +93,21 @@ export const mentionPartTypes: ( ]; }; -const _textStyle: ( - theme: 'blue' | 'momentCaption' | 'commentPreview', -) => StyleProp<TextStyle> = (theme) => { +const _textStyle: (theme: 'blue' | 'white') => StyleProp<TextStyle> = ( + theme, +) => { switch (theme) { case 'blue': return { color: TAGG_LIGHT_BLUE, top: normalize(3), }; - case 'commentPreview': - return { - color: 'white', - fontWeight: '800', - top: normalize(3), - }; - case 'momentCaption': + case 'white': default: return { color: 'white', fontWeight: '800', - top: normalize(4.5), + top: normalize(3), }; } }; |