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

@ -17,7 +17,7 @@
*/
// eslint-disable-next-line path-alias/no-relative
import { findByPropsLazy, waitFor } from "../webpack";
import { findByCodeLazy, findByPropsLazy, waitFor } from "../webpack";
export let React: typeof import("react");
export let useState: typeof React.useState;
@ -28,7 +28,9 @@ export let useRef: typeof React.useRef;
export let useReducer: typeof React.useReducer;
export let useCallback: typeof React.useCallback;
export const ReactDOM: typeof import("react-dom") & typeof import("react-dom/client") = findByPropsLazy("createPortal");
export const ReactDOM: typeof import("react-dom") = findByPropsLazy("createPortal");
// 299 is an error code used in createRoot and createPortal
export const createRoot: typeof import("react-dom/client").createRoot = findByCodeLazy("(299));", ".onRecoverableError");
waitFor("useState", m => {
React = m;