Remove obsolete mapMangledModule ~ modules are no longer mangled

This commit is contained in:
V 2023-11-23 03:11:17 +01:00
parent 6869705673
commit 63451bad25
No known key found for this signature in database
GPG key ID: A1DC0CFB5615D905
12 changed files with 46 additions and 90 deletions

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { filters, findByProps, findByPropsLazy, mapMangledModuleLazy } from "@webpack";
import { findByProps, findByPropsLazy } from "@webpack";
import type { ComponentType, PropsWithChildren, ReactNode, Ref } from "react";
import { LazyComponent } from "./react";
@ -49,13 +49,7 @@ export interface ModalOptions {
type RenderFunction = (props: ModalProps) => ReactNode;
export const Modals = mapMangledModuleLazy(".closeWithCircleBackground", {
ModalRoot: filters.byCode(".root"),
ModalHeader: filters.byCode(".header"),
ModalContent: filters.byCode(".content"),
ModalFooter: filters.byCode(".footerSeparator"),
ModalCloseButton: filters.byCode(".closeWithCircleBackground"),
}) as {
export const Modals = findByPropsLazy("ModalRoot", "ModalCloseButton") as {
ModalRoot: ComponentType<PropsWithChildren<{
transitionState: ModalTransitionState;
size?: ModalSize;