diff --git a/lib/shared/community-utils.js b/lib/shared/community-utils.js --- a/lib/shared/community-utils.js +++ b/lib/shared/community-utils.js @@ -20,6 +20,11 @@ NO_CHANNEL_TAGGED: 'No Farcaster channel tagged', }; +const tagFarcasterChannelErrorMessages: { +[string]: string } = { + already_in_use: 'This Farcaster channel is already tagged to a community.', + channel_not_found: 'Could not find a channel with the provided name.', +}; + function farcasterChannelTagBlobHash(farcasterChannelID: string): string { return `farcaster_channel_tag_${farcasterChannelID}`; } @@ -136,6 +141,7 @@ export { tagFarcasterChannelCopy, + tagFarcasterChannelErrorMessages, farcasterChannelTagBlobHash, useCreateFarcasterChannelTag, useRemoveFarcasterChannelTag, diff --git a/native/community-settings/tag-farcaster-channel/tag-farcaster-channel-by-name.react.js b/native/community-settings/tag-farcaster-channel/tag-farcaster-channel-by-name.react.js --- a/native/community-settings/tag-farcaster-channel/tag-farcaster-channel-by-name.react.js +++ b/native/community-settings/tag-farcaster-channel/tag-farcaster-channel-by-name.react.js @@ -5,10 +5,12 @@ import { View, Text } from 'react-native'; import { NeynarClientContext } from 'lib/components/neynar-client-provider.react.js'; -import { useCreateFarcasterChannelTag } from 'lib/shared/community-utils.js'; +import { + tagFarcasterChannelErrorMessages, + useCreateFarcasterChannelTag, +} from 'lib/shared/community-utils.js'; import type { TagFarcasterChannelNavigationProp } from './tag-farcaster-channel-navigator.react.js'; -import { tagFarcasterChannelErrorMessages } from './tag-farcaster-channel-utils.js'; import RegistrationButton from '../../account/registration/registration-button.react.js'; import TextInput from '../../components/text-input.react.js'; import type { NavigationRoute } from '../../navigation/route-names.js'; diff --git a/native/community-settings/tag-farcaster-channel/tag-farcaster-channel-utils.js b/native/community-settings/tag-farcaster-channel/tag-farcaster-channel-utils.js deleted file mode 100644 --- a/native/community-settings/tag-farcaster-channel/tag-farcaster-channel-utils.js +++ /dev/null @@ -1,8 +0,0 @@ -// @flow - -const tagFarcasterChannelErrorMessages: { +[string]: string } = { - already_in_use: 'This Farcaster channel is already tagged to a community.', - channel_not_found: 'Could not find a channel with the provided name.', -}; - -export { tagFarcasterChannelErrorMessages }; diff --git a/native/community-settings/tag-farcaster-channel/tag-farcaster-channel.react.js b/native/community-settings/tag-farcaster-channel/tag-farcaster-channel.react.js --- a/native/community-settings/tag-farcaster-channel/tag-farcaster-channel.react.js +++ b/native/community-settings/tag-farcaster-channel/tag-farcaster-channel.react.js @@ -3,13 +3,15 @@ import * as React from 'react'; import { View, Text } from 'react-native'; -import { tagFarcasterChannelCopy } from 'lib/shared/community-utils.js'; +import { + tagFarcasterChannelCopy, + tagFarcasterChannelErrorMessages, +} from 'lib/shared/community-utils.js'; import type { CommunityInfo } from 'lib/types/community-types.js'; import RemoveTagButton from './remove-tag-button.react.js'; import TagChannelButton from './tag-channel-button.react.js'; import type { TagFarcasterChannelNavigationProp } from './tag-farcaster-channel-navigator.react.js'; -import { tagFarcasterChannelErrorMessages } from './tag-farcaster-channel-utils.js'; import { type NavigationRoute } from '../../navigation/route-names.js'; import { useSelector } from '../../redux/redux-utils.js'; import { useStyles } from '../../themes/colors.js';