aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/viewIcons.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/viewIcons.tsx')
-rw-r--r--src/plugins/viewIcons.tsx20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/plugins/viewIcons.tsx b/src/plugins/viewIcons.tsx
index a55b8b8..d6cbf60 100644
--- a/src/plugins/viewIcons.tsx
+++ b/src/plugins/viewIcons.tsx
@@ -1,7 +1,7 @@
import { Devs } from "../utils/constants";
import definePlugin from "../utils/types";
import { lazyWebpack, makeLazy } from "../utils/misc";
-import { ModalSize, openModal } from "../utils/modal";
+import { ModalRoot, ModalSize, openModal } from "../utils/modal";
import { find } from "../webpack";
import { React } from "../webpack/common";
@@ -15,14 +15,16 @@ export default definePlugin({
description: "Makes Avatars/Banners in user profiles clickable, and adds Guild Context Menu Entries to View Banner/Icon.",
openImage(url: string) {
- openModal(() => (
- <ImageModal
- shouldAnimate={true}
- original={url}
- src={url}
- renderLinkComponent={props => React.createElement(getMaskedLink(), props)}
- />
- ), { size: ModalSize.DYNAMIC });
+ openModal(modalProps => (
+ <ModalRoot size={ModalSize.DYNAMIC} {...modalProps}>
+ <ImageModal
+ shouldAnimate={true}
+ original={url}
+ src={url}
+ renderLinkComponent={props => React.createElement(getMaskedLink(), props)}
+ />
+ </ModalRoot>
+ ));
},
patches: [