19 lines
606 B
TypeScript
19 lines
606 B
TypeScript
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) => {
|
|
const t = translateOutsideContext();
|
|
const link = `${window.location.origin}/s/${shareId}`;
|
|
return modals.openModal({
|
|
title: t("account.shares.modal.share-link"),
|
|
children: (
|
|
<Stack align="stretch">
|
|
<TextInput variant="filled" value={link} />
|
|
</Stack>
|
|
),
|
|
});
|
|
};
|
|
|
|
export default showShareLinkModal;
|