fix: shareUrl uses wrong origin

This commit is contained in:
Elias Schneider
2023-01-11 13:06:38 +01:00
parent 02e41e2437
commit f1b44f87fa
5 changed files with 25 additions and 10 deletions

View File

@@ -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: (