From 963a7332b4daa183ec2d8d3ddf10f3f73b01746a Mon Sep 17 00:00:00 2001 From: Vendicated Date: Sun, 6 Nov 2022 18:37:01 +0100 Subject: Migrate proxied components to and fix LazyComponent --- src/plugins/viewIcons.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/viewIcons.tsx b/src/plugins/viewIcons.tsx index 3ea9afa..bd70bd6 100644 --- a/src/plugins/viewIcons.tsx +++ b/src/plugins/viewIcons.tsx @@ -17,14 +17,13 @@ */ import { Devs } from "../utils/constants"; -import { lazyWebpack, makeLazy } from "../utils/misc"; +import { LazyComponent } from "../utils/misc"; import { ModalRoot, ModalSize, openModal } from "../utils/modal"; import definePlugin from "../utils/types"; import { find } from "../webpack"; -import { React } from "../webpack/common"; -const ImageModal = lazyWebpack(m => m.prototype?.render?.toString().includes("OPEN_ORIGINAL_IMAGE")); -const getMaskedLink = makeLazy(() => find(m => m.type?.toString().includes("MASKED_LINK)"))); +const ImageModal = LazyComponent(() => find(m => m.prototype?.render?.toString().includes("OPEN_ORIGINAL_IMAGE"))); +const MaskedLink = LazyComponent(() => find(m => m.type?.toString().includes("MASKED_LINK)"))); const OPEN_URL = "Vencord.Plugins.plugins.ViewIcons.openImage("; export default definePlugin({ @@ -39,7 +38,7 @@ export default definePlugin({ shouldAnimate={true} original={url} src={url} - renderLinkComponent={props => React.createElement(getMaskedLink(), props)} + renderLinkComponent={() => } /> )); -- cgit