-
-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: show alternative to copy button if site is not using https
- Loading branch information
1 parent
b1bfb09
commit 7e877ce
Showing
3 changed files
with
37 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
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}`; | ||
return modals.openModal({ | ||
title: "Share link", | ||
children: ( | ||
<Stack align="stretch"> | ||
<TextInput variant="filled" value={link} /> | ||
</Stack> | ||
), | ||
}); | ||
}; | ||
|
||
export default showShareLinkModal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters