diff --git a/src/assets/translations.data.json b/src/assets/translations.data.json index b0bd613fd81b0265a63cb9c0811e7993c71f6ec9..b9f9c9f59294af0a233999ec88bbf89d083b366e 100644 --- a/src/assets/translations.data.json +++ b/src/assets/translations.data.json @@ -89,7 +89,7 @@ "invite.enter_via": "Enter via ", "invite.tweet": "tweet", "invite.and_enter_code": " with code:", - "invite.or_visit": "or visit", + "invite.or_visit": "or share permalink", "spoke.primary_tagline": "make your space", "spoke.secondary_tagline": "Create 3D social scenes for ", "spoke.thank_you": "Thank you for downloading Spoke!", diff --git a/src/react-components/invite-dialog.js b/src/react-components/invite-dialog.js index aa5c511bc6da6f8b41c1d08222ea4d0fec7eb512..97d01aee93a5e5b10bdcfc73bb362f39be5988e7 100644 --- a/src/react-components/invite-dialog.js +++ b/src/react-components/invite-dialog.js @@ -15,6 +15,7 @@ function pad(num, size) { export default class InviteDialog extends Component { static propTypes = { entryCode: PropTypes.number, + hubId: PropTypes.string, allowShare: PropTypes.bool, onClose: PropTypes.func }; @@ -42,11 +43,11 @@ export default class InviteDialog extends Component { const { entryCode } = this.props; const entryCodeString = pad(entryCode, 6); - const shareShortLink = `hub.link/${entryCodeString}`; - const shareFullLink = [location.protocol, "//", location.host, location.pathname].join(""); + const shareShortLink = `hub.link/${this.props.hubId}`; + const shareFullLink = [location.protocol, "//", "hub.link", location.pathname].join(""); const tweetText = `Join me now in #hubs!`; - const tweetLink = `https://twitter.com/share?url=${encodeURIComponent(shareFullLink)}&text=${encodeURIComponent( + const tweetLink = `https://twitter.com/share?url=${encodeURIComponent(shareShortLink)}&text=${encodeURIComponent( tweetText )}`; diff --git a/src/react-components/ui-root.js b/src/react-components/ui-root.js index 73c2a1e871da4c1f4185daf1a85efaaaac80eb62..88d19abd215a3fad913c9d88f2006f57b43c9770 100644 --- a/src/react-components/ui-root.js +++ b/src/react-components/ui-root.js @@ -990,6 +990,7 @@ class UIRoot extends Component { <InviteDialog allowShare={!this.props.availableVREntryTypes.isInHMD} entryCode={this.props.hubEntryCode} + hubId={this.props.hubId} onClose={() => this.setState({ showInviteDialog: false })} /> )}