From 5580f035dfb7dabc6b3ad74128dbc6674d0c2f84 Mon Sep 17 00:00:00 2001 From: Mashy Date: Thu, 23 Jan 2020 11:15:59 +1000 Subject: [PATCH] invite link 1 click copy --- client/src/events.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/events.jsx b/client/src/events.jsx index 4bff6434..9a0ae91a 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -165,9 +165,9 @@ function registerEvents(store) { function setInvite(code) { if (!code) return store.dispatch(actions.setInvite(null)); - - navigator.clipboard.writeText(code).then(() => { - notify(`your invite code ${code} was copied to the clipboard.`); + const link = `${document.location.origin}#join=${code}`; + navigator.clipboard.writeText(link).then(() => { + notify('Your invite code was copied to the clipboard.'); }, () => {}); return store.dispatch(actions.setInvite(code));