Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32221306
D12041.1765197664.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D12041.1765197664.diff
View Options
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,10 +3,13 @@
import * as React from 'react';
import { View, Text } from 'react-native';
+import type { CommunityInfo } from 'lib/types/community-types.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';
export type TagFarcasterChannelParams = {
@@ -23,6 +26,10 @@
const { communityID } = route.params;
+ const communityInfo: ?CommunityInfo = useSelector(
+ state => state.communityStore.communityInfos[communityID],
+ );
+
const styles = useStyles(unboundStyles);
const [error, setError] = React.useState<?string>(null);
@@ -39,6 +46,24 @@
);
}, [error, styles.error]);
+ const channelNameTextContent = React.useMemo(() => {
+ if (!communityInfo?.farcasterChannelID) {
+ return (
+ <Text style={styles.noChannelText}>No Farcaster channel tagged</Text>
+ );
+ }
+
+ return (
+ <Text style={styles.channelNameText}>
+ {`/${communityInfo.farcasterChannelID}`}
+ </Text>
+ );
+ }, [
+ communityInfo?.farcasterChannelID,
+ styles.channelNameText,
+ styles.noChannelText,
+ ]);
+
const tagFarcasterChannel = React.useMemo(
() => (
<View>
@@ -49,6 +74,10 @@
</View>
<Text style={styles.sectionHeaderText}>FARCASTER CHANNEL</Text>
<View style={styles.panelSectionContainer}>
+ <Text style={styles.sectionText}>Selected channel:</Text>
+ <View style={styles.channelNameContainer}>
+ {channelNameTextContent}
+ </View>
<TagChannelButton communityID={communityID} setError={setError} />
</View>
<View style={styles.errorContainer}>{errorMessage}</View>
@@ -58,7 +87,9 @@
styles.panelSectionContainer,
styles.sectionText,
styles.sectionHeaderText,
+ styles.channelNameContainer,
styles.errorContainer,
+ channelNameTextContent,
communityID,
errorMessage,
],
@@ -89,6 +120,20 @@
paddingBottom: 4,
marginTop: 24,
},
+ channelNameContainer: {
+ marginTop: 8,
+ marginBottom: 24,
+ height: 20,
+ },
+ channelNameText: {
+ fontSize: 16,
+ fontWeight: '600',
+ color: 'panelForegroundLabel',
+ },
+ noChannelText: {
+ fontSize: 16,
+ color: 'panelForegroundLabel',
+ },
errorContainer: {
height: 18,
},
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 8, 12:41 PM (3 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5848247
Default Alt Text
D12041.1765197664.diff (2 KB)
Attached To
Mode
D12041: [native] display existing farcaster channel tag in TagFarcasterChannel screen
Attached
Detach File
Event Timeline
Log In to Comment