Fix ImageZoom, Vencord Notifications & ReactErrorDecoder

This commit is contained in:
Nuckyz 2025-05-05 19:39:34 -03:00
parent 9a3c66abfd
commit 89ef26e719
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
5 changed files with 16 additions and 15 deletions

View file

@ -23,7 +23,7 @@ import { debounce } from "@shared/debounce";
import { Devs } from "@utils/constants";
import { Logger } from "@utils/Logger";
import definePlugin, { OptionType } from "@utils/types";
import { Menu, ReactDOM } from "@webpack/common";
import { createRoot, Menu } from "@webpack/common";
import { JSX } from "react";
import type { Root } from "react-dom/client";
@ -242,7 +242,7 @@ export default definePlugin({
if (instance.props.id === ELEMENT_ID) {
if (!this.currentMagnifierElement) {
this.currentMagnifierElement = <Magnifier size={settings.store.size} zoom={settings.store.zoom} instance={instance} />;
this.root = ReactDOM.createRoot(this.element!);
this.root = createRoot(this.element!);
this.root.render(this.currentMagnifierElement);
}
}