diff --git a/native/community-settings/tag-farcaster-channel/tag-channel-button.react.js b/native/community-settings/tag-farcaster-channel/tag-channel-button.react.js --- a/native/community-settings/tag-farcaster-channel/tag-channel-button.react.js +++ b/native/community-settings/tag-farcaster-channel/tag-channel-button.react.js @@ -28,11 +28,12 @@ type Props = { +communityID: string, + +isLoadingChannelInfo: boolean, +setError: SetState, }; function TagChannelButton(props: Props): React.Node { - const { communityID, setError } = props; + const { communityID, isLoadingChannelInfo, setError } = props; const { navigate } = useNavigation(); @@ -159,7 +160,8 @@ createOrUpdateFarcasterChannelTagStatusSelector, ); const isLoadingCreateOrUpdateFarcasterChannelTag = - createOrUpdateFarcasterChannelTagStatus === 'loading'; + createOrUpdateFarcasterChannelTagStatus === 'loading' || + isLoadingChannelInfo; const buttonContent = React.useMemo(() => { if (isLoadingCreateOrUpdateFarcasterChannelTag) { 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 @@ -46,10 +46,15 @@ const [selectedChannel, setSelectedChannel] = React.useState(farcasterChannel); + const [isLoadingChannelInfo, setIsLoadingChannelInfo] = React.useState(false); + React.useEffect(() => { void (async () => { + setIsLoadingChannelInfo(true); + if (!communityInfo?.farcasterChannelID) { setSelectedChannel(null); + setIsLoadingChannelInfo(false); return; } @@ -59,6 +64,7 @@ ); setSelectedChannel(channel); + setIsLoadingChannelInfo(false); })(); }, [client, communityInfo?.farcasterChannelID, fid]); @@ -94,7 +100,11 @@ Selected channel: {channelNameTextContent} - + {errorMessage} @@ -107,6 +117,7 @@ styles.errorContainer, channelNameTextContent, communityID, + isLoadingChannelInfo, errorMessage, ], );