Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3398019
D8292.id27997.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D8292.id27997.diff
View Options
diff --git a/lib/facts/links.js b/lib/facts/links.js
new file mode 100644
--- /dev/null
+++ b/lib/facts/links.js
@@ -0,0 +1,7 @@
+// @flow
+
+function inviteLinkUrl(secret: string): string {
+ return `https://comm.app/invite/${secret}`;
+}
+
+export { inviteLinkUrl };
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
@@ -9,6 +9,7 @@
disableInviteLink as callDisableInviteLink,
disableInviteLinkLinkActionTypes,
} from 'lib/actions/link-actions.js';
+import { inviteLinkUrl } from 'lib/facts/links.js';
import { primaryInviteLinksSelector } from 'lib/selectors/invite-links-selectors.js';
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
@@ -147,7 +148,7 @@
<Text style={styles.sectionTitle}>INVITE URL</Text>
<View style={styles.section}>
<View style={styles.inviteLink}>
- <Text style={styles.inviteLinkPrefix}>https://comm.app/invite/</Text>
+ <Text style={styles.inviteLinkPrefix}>{inviteLinkUrl('')}</Text>
<TextInput
style={styles.input}
value={name}
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
@@ -5,6 +5,7 @@
import { Text, View } from 'react-native';
import { TouchableOpacity } from 'react-native-gesture-handler';
+import { inviteLinkUrl } from 'lib/facts/links.js';
import { primaryInviteLinksSelector } from 'lib/selectors/invite-links-selectors.js';
import { threadHasPermission } from 'lib/shared/thread-utils.js';
import type { InviteLink } from 'lib/types/link-types.js';
@@ -40,7 +41,7 @@
const styles = useStyles(unboundStyles);
const { modalForegroundLabel } = useColors();
- const linkUrl = `https://comm.app/invite/${inviteLink?.name ?? ''}`;
+ const linkUrl = inviteLinkUrl(inviteLink?.name ?? '');
const onPressCopy = React.useCallback(() => {
Clipboard.setString(linkUrl);
setTimeout(confirmCopy);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 2, 8:22 PM (18 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2608855
Default Alt Text
D8292.id27997.diff (2 KB)
Attached To
Mode
D8292: [lib][native] Extract invite link url
Attached
Detach File
Event Timeline
Log In to Comment