diff --git a/native/invite-links/invite-links-button.react.js b/native/invite-links/invite-links-button.react.js --- a/native/invite-links/invite-links-button.react.js +++ b/native/invite-links/invite-links-button.react.js @@ -66,14 +66,14 @@ ); if (canManageLinks) { result.push({ - label: 'Manage Invite Links', + label: 'Manage invite links', action: navigateToManagePublicLinkView, }); } if (inviteLink) { result.push({ - label: 'Invite Link', + label: 'Invite link', action: navigateToInviteLinksView, }); } diff --git a/native/invite-links/invite-links-navigator.react.js b/native/invite-links/invite-links-navigator.react.js --- a/native/invite-links/invite-links-navigator.react.js +++ b/native/invite-links/invite-links-navigator.react.js @@ -10,7 +10,6 @@ import ManagePublicLinkScreen from './manage-public-link-screen.react.js'; import ViewInviteLinksHeaderLeftButton from './view-invite-links-header-left-button.react.js'; -import ViewInviteLinksHeaderTitle from './view-invite-links-header-title.react.js'; import ViewInviteLinksScreen from './view-invite-links-screen.react.js'; import HeaderBackButton from '../navigation/header-back-button.react.js'; import { defaultStackScreenOptions } from '../navigation/options.js'; @@ -35,18 +34,15 @@ StackNavigationHelpers<ScreenParamList>, >(); -const viewInviteLinksOptions = ({ route }) => ({ - // eslint-disable-next-line react/display-name - headerTitle: props => ( - <ViewInviteLinksHeaderTitle community={route.params.community} {...props} /> - ), +const viewInviteLinksOptions = { + headerTitle: 'Invite link', headerLeft: ViewInviteLinksHeaderLeftButton, headerBackImage: () => null, headerBackTitleStyle: { marginLeft: 20 }, -}); +}; const managePublicLinkOptions = { - headerTitle: 'Public Link', + headerTitle: 'Public link', headerBackTitleVisible: false, headerLeft: HeaderBackButton, }; diff --git a/native/invite-links/manage-public-link-screen.react.js b/native/invite-links/manage-public-link-screen.react.js --- a/native/invite-links/manage-public-link-screen.react.js +++ b/native/invite-links/manage-public-link-screen.react.js @@ -46,9 +46,9 @@ const onDisableButtonClick = React.useCallback(() => { Alert.alert( 'Disable public link', - 'Are you sure you want to disable your public link? Members who have your community’s public link but have not joined will not able to with the disabled link. \n' + + 'Are you sure you want to disable your public link?\n' + '\n' + - 'Other communities may also claim your previous public link url.', + 'Other communities will be able to claim the same URL.', [ { text: 'Confirm disable', @@ -83,11 +83,10 @@ <View> <View style={styles.section}> <Text style={styles.sectionText}> - Let your community be more accessible with your own unique public - link. By enabling a public link, you are allowing anyone who has your - link to join your community.{'\n\n'} - Editing your community’s public link allows other communities to claim - your previous URL. + Invite links make it easy for your friends to join your community. + Anybody who knows your community’s invite link will be able to join + it.{'\n\n'}Note that if you change your public link’s URL, other + communities will be able to claim the old URL. </Text> </View> <Text style={styles.sectionTitle}>INVITE URL</Text> diff --git a/native/invite-links/view-invite-links-header-title.react.js b/native/invite-links/view-invite-links-header-title.react.js deleted file mode 100644 --- a/native/invite-links/view-invite-links-header-title.react.js +++ /dev/null @@ -1,25 +0,0 @@ -// @flow - -import type { HeaderTitleInputProps } from '@react-navigation/elements'; -import { HeaderTitle } from '@react-navigation/elements'; -import * as React from 'react'; - -import type { ThreadInfo } from 'lib/types/thread-types.js'; -import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js'; -import { firstLine } from 'lib/utils/string-utils.js'; - -type Props = { - +community: ThreadInfo, - ...HeaderTitleInputProps, -}; -function ViewInviteLinksHeaderTitle(props: Props): React.Node { - const { community, ...rest } = props; - const { uiName } = useResolvedThreadInfo(community); - const title = `Invite people to ${firstLine(uiName)}`; - return <HeaderTitle {...rest}>{title}</HeaderTitle>; -} - -const MemoizedViewInviteLinksHeaderTitle: React.ComponentType<Props> = - React.memo<Props>(ViewInviteLinksHeaderTitle); - -export default MemoizedViewInviteLinksHeaderTitle; diff --git a/native/invite-links/view-invite-links-screen.react.js b/native/invite-links/view-invite-links-screen.react.js --- a/native/invite-links/view-invite-links-screen.react.js +++ b/native/invite-links/view-invite-links-screen.react.js @@ -79,7 +79,7 @@ } else { description = ( <Text style={styles.details}> - Use this public link to invite your friends into the community! + Share this invite link to help your friends join your community! </Text> ); } diff --git a/native/navigation/invite-link-modal.react.js b/native/navigation/invite-link-modal.react.js --- a/native/navigation/invite-link-modal.react.js +++ b/native/navigation/invite-link-modal.react.js @@ -59,8 +59,8 @@ <> <Text style={styles.invalidInviteTitle}>Invite invalid</Text> <Text style={styles.invalidInviteExplanation}> - This invite link may be expired, please try again with another invite - link + This invite link may be expired. Please try again with another invite + link. </Text> </> ); @@ -128,7 +128,7 @@ style={styles.activityIndicatorStyle} /> ) : ( - <Text style={styles.buttonText}>Accept Invite</Text> + <Text style={styles.buttonText}>Accept invite</Text> ); return ( <> diff --git a/web/invite-links/accept-invite-modal.react.js b/web/invite-links/accept-invite-modal.react.js --- a/web/invite-links/accept-invite-modal.react.js +++ b/web/invite-links/accept-invite-modal.react.js @@ -89,7 +89,7 @@ disabled={joinThreadLoadingStatus === 'loading'} onClick={joinCommunity} > - Accept Invite + Accept invite </Button> <Button variant="outline" onClick={popModal}> Cancel @@ -103,8 +103,8 @@ <div className={css.group}> <div className={css.heading}>Invite invalid</div> <div className={css.text}> - This invite link may be expired, please try again with another - invite link + This invite link may be expired. Please try again with another + invite link. </div> </div> <hr /> diff --git a/web/invite-links/view-invite-link-modal.react.js b/web/invite-links/view-invite-link-modal.react.js --- a/web/invite-links/view-invite-link-modal.react.js +++ b/web/invite-links/view-invite-link-modal.react.js @@ -3,14 +3,11 @@ import * as React from 'react'; import { useModalContext } from 'lib/components/modal-provider.react.js'; -import { threadInfoSelector } from 'lib/selectors/thread-selectors.js'; import type { InviteLink } from 'lib/types/link-types.js'; -import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js'; import CopyInviteLinkButton from './copy-invite-link-button.react.js'; import css from './view-invite-link-modal.css'; import Modal from '../modals/modal.react.js'; -import { useSelector } from '../redux/redux-utils.js'; type Props = { +inviteLink: InviteLink, @@ -18,21 +15,13 @@ function ViewInviteLinkModal(props: Props): React.Node { const { inviteLink } = props; - const threadInfo = useSelector( - state => threadInfoSelector(state)[inviteLink.communityID], - ); - const resolvedThreadInfo = useResolvedThreadInfo(threadInfo); const { popModal } = useModalContext(); return ( - <Modal - name={`Invite people to ${resolvedThreadInfo.uiName}`} - onClose={popModal} - size="fit-content" - > + <Modal name="Invite link" onClose={popModal} size="fit-content"> <div className={css.container}> <div className={css.description}> - Use this public link to invite your friends into the community! + Share this invite link to help your friends join your community! </div> <div className={css.sectionHeader}>Public link</div> <CopyInviteLinkButton inviteLink={inviteLink} />