diff --git a/src/plugins/copyStickerLinks/index.tsx b/src/plugins/copyStickerLinks/index.tsx index d9e71392e..78e414e4d 100644 --- a/src/plugins/copyStickerLinks/index.tsx +++ b/src/plugins/copyStickerLinks/index.tsx @@ -72,44 +72,49 @@ async function fetchSticker(id: string) { function buildMenuItem(type: "Sticker", fetchData: () => Promisable>) { return ( - { - const res = await fetchData(); - const data = { t: type, ...res } as Sticker; - const url = getUrl(data); - console.log("URL: " + url + "\n" + "Data: " + data); - Toasts.show({ - message: "Link to sticker copied!", - type: Toasts.Type.SUCCESS, - id: Toasts.genId() - }); - Clipboard.copy(url); - } - } - /> + <> + + + { + const res = await fetchData(); + const data = { t: type, ...res } as Sticker; + const url = getUrl(data); + console.log("URL: " + url + "\n" + "Data: " + data); + Toasts.show({ + message: "Link to sticker copied!", + type: Toasts.Type.SUCCESS, + id: Toasts.genId() + }); + Clipboard.copy(url); + } + } + /> + + { + const res = await fetchData(); + const data = { t: type, ...res } as Sticker; + const url = getUrl(data); + VencordNative.native.openExternal(url); + } + } + /> + ); } -/* - { - const res = await fetchData(); - const data = { t: type, ...res } as Sticker; - const url = getUrl(data); - VencordNative.native.openExternal(url); - } - } - /> -*/ + + const messageContextMenuPatch: NavContextMenuPatchCallback = (children, props) => { - const { favoriteableId, itemHref, itemSrc, favoriteableType } = props ?? {}; + const { favoriteableId, favoriteableType } = props ?? {}; if (!favoriteableId) return; const menuItem = (() => { switch (favoriteableType) {