fix: copy invite link has duplicated origin (#3608)

pull/3615/head
Joel 2 years ago committed by GitHub
parent de3b490f8e
commit 3aa182e26a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -18,7 +18,7 @@ const InvitationLink = ({
const selector = useRef(`invite-link-${randomString(4)}`)
const copyHandle = useCallback(() => {
copy(window.location.origin + value.url)
copy(`${!value.url.includes('http://') ? window.location.origin : ''}${value.url}`)
setIsCopied(true)
}, [value])

Loading…
Cancel
Save