fix(lib): fix invite url (#426)

This commit is contained in:
Anton Tranelis 2025-10-14 12:10:04 +02:00 committed by GitHub
parent 590be2b7e5
commit 719e1e16b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,7 +33,9 @@ export const useNavigationUrl = (coordinates?: [number, number]) => {
export const useShareLogic = (item?: Item) => {
const shareUrl = window.location.href
const shareTitle = item?.name ?? 'Utopia Map Item'
const inviteLink = shareUrl
const inviteLink = item?.secrets
? `${window.location.origin}/invite/${item.secrets[0].secret}`
: shareUrl
const copyLink = () => {
navigator.clipboard