fix: use current window url instead of app url in frontend

This commit is contained in:
Elias Schneider
2024-11-14 19:10:11 +01:00
parent ff2dd81055
commit 6f45c3b1fb
12 changed files with 24 additions and 56 deletions

View File

@@ -2,13 +2,9 @@ import { Stack, TextInput } from "@mantine/core";
import { ModalsContextProps } from "@mantine/modals/lib/context";
import { translateOutsideContext } from "../../hooks/useTranslate.hook";
const showShareLinkModal = (
modals: ModalsContextProps,
shareId: string,
appUrl: string,
) => {
const showShareLinkModal = (modals: ModalsContextProps, shareId: string) => {
const t = translateOutsideContext();
const link = `${appUrl}/s/${shareId}`;
const link = `${window.location.origin}/s/${shareId}`;
return modals.openModal({
title: t("account.shares.modal.share-link"),
children: (