diff --git a/frontend/src/components/account/showShareLinkModal.tsx b/frontend/src/components/account/showShareLinkModal.tsx index e4dc9404..cfa3b1b8 100644 --- a/frontend/src/components/account/showShareLinkModal.tsx +++ b/frontend/src/components/account/showShareLinkModal.tsx @@ -1,8 +1,8 @@ import { Stack, TextInput } from "@mantine/core"; import { ModalsContextProps } from "@mantine/modals/lib/context"; -const showShareLinkModal = (modals: ModalsContextProps, shareId: string) => { - const link = `${window.location.origin}/share/${shareId}`; +const showShareLinkModal = (modals: ModalsContextProps, shareId: string, appUrl : string) => { + const link = `${appUrl}/share/${shareId}`; return modals.openModal({ title: "Share link", children: ( diff --git a/frontend/src/components/upload/modals/showCompletedUploadModal.tsx b/frontend/src/components/upload/modals/showCompletedUploadModal.tsx index b422281f..a03ed9ea 100644 --- a/frontend/src/components/upload/modals/showCompletedUploadModal.tsx +++ b/frontend/src/components/upload/modals/showCompletedUploadModal.tsx @@ -15,7 +15,11 @@ import { TbCopy } from "react-icons/tb"; import { Share } from "../../../types/share.type"; import toast from "../../../utils/toast.util"; -const showCompletedUploadModal = (modals: ModalsContextProps, share: Share) => { +const showCompletedUploadModal = ( + modals: ModalsContextProps, + share: Share, + appUrl: string +) => { return modals.openModal({ closeOnClickOutside: false, withCloseButton: false, @@ -25,15 +29,16 @@ const showCompletedUploadModal = (modals: ModalsContextProps, share: Share) => {