From 719e1e16b53f7fd913afa94163e65408149d5e40 Mon Sep 17 00:00:00 2001 From: Anton Tranelis <31516529+antontranelis@users.noreply.github.com> Date: Tue, 14 Oct 2025 12:10:04 +0200 Subject: [PATCH] fix(lib): fix invite url (#426) --- .../Map/Subcomponents/ItemPopupComponents/HeaderView/hooks.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView/hooks.ts b/lib/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView/hooks.ts index 5d13af9b..c0b2e93e 100644 --- a/lib/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView/hooks.ts +++ b/lib/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView/hooks.ts @@ -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