aboutsummaryrefslogtreecommitdiff
path: root/src/utils/comments.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-06-24 17:41:45 -0400
committerIvan Chen <ivan@tagg.id>2021-06-24 17:41:45 -0400
commitb184179a8bff25ad018d02abc31acadc7b3f6a62 (patch)
treeefd94448ee76860156d7622a61e6eb8785c10f10 /src/utils/comments.tsx
parent981051448fee6197544383e535fea7a72827d41d (diff)
parent53bdc94cf0491e348b7d4ad61e51ce1844423773 (diff)
Merge branch 'master' into tma948-video-playback
# Conflicts: # ios/Podfile.lock # package.json # src/components/moments/Moment.tsx # src/routes/main/MainStackNavigator.tsx # src/screens/moments/TagFriendsScreen.tsx # src/screens/profile/CaptionScreen.tsx # yarn.lock
Diffstat (limited to 'src/utils/comments.tsx')
-rw-r--r--src/utils/comments.tsx11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/utils/comments.tsx b/src/utils/comments.tsx
index 910b44e7..28879622 100644
--- a/src/utils/comments.tsx
+++ b/src/utils/comments.tsx
@@ -79,13 +79,16 @@ export const renderTextWithMentions: React.FC<RenderProps> = ({
);
};
-export const mentionPartTypes: (theme: 'blue' | 'white') => PartType[] = (
- theme,
-) => {
+export const mentionPartTypes: (
+ theme: 'blue' | 'white',
+ component: 'caption' | 'comment',
+) => PartType[] = (theme, component) => {
return [
{
trigger: '@',
- renderSuggestions: (props) => <TaggTypeahead {...props} />,
+ renderSuggestions: (props) => (
+ <TaggTypeahead component={component} {...props} />
+ ),
allowedSpacesCount: 0,
isInsertSpaceAfterMention: true,
textStyle: _textStyle(theme),