fix: show alternative to copy button if site is not using https

This commit is contained in:
Elias Schneider
2022-12-10 13:16:23 +01:00
parent b1bfb09dfd
commit 7e877ce9f4
3 changed files with 37 additions and 14 deletions

View File

@@ -40,14 +40,16 @@ const Body = ({ share }: { share: Share }) => {
variant="filled"
value={link}
rightSection={
<ActionIcon
onClick={() => {
clipboard.copy(link);
toast.success("Your link was copied to the keyboard.");
}}
>
<TbCopy />
</ActionIcon>
window.isSecureContext && (
<ActionIcon
onClick={() => {
clipboard.copy(link);
toast.success("Your link was copied to the keyboard.");
}}
>
<TbCopy />
</ActionIcon>
)
}
/>
<Text