mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-09 22:53:02 -04:00
Migrate proxied components to and fix LazyComponent
This commit is contained in:
parent
440baf6028
commit
963a7332b4
6 changed files with 24 additions and 21 deletions
|
@ -21,8 +21,8 @@ import { User } from "discord-types/general";
|
|||
import type Other from "discord-types/other";
|
||||
import type Stores from "discord-types/stores";
|
||||
|
||||
import { lazyWebpack } from "../utils/misc";
|
||||
import { _resolveReady, filters, mapMangledModuleLazy, waitFor } from "./webpack";
|
||||
import { LazyComponent, lazyWebpack } from "../utils/misc";
|
||||
import { _resolveReady, filters, findByCode, mapMangledModuleLazy, waitFor } from "./webpack";
|
||||
export const Margins = lazyWebpack(filters.byProps("marginTop20"));
|
||||
|
||||
export let FluxDispatcher: Other.FluxDispatcher;
|
||||
|
@ -48,8 +48,8 @@ export let Router: any;
|
|||
export let TextInput: any;
|
||||
export let Text: (props: TextProps) => JSX.Element;
|
||||
|
||||
export const Select = lazyWebpack(filters.byCode("optionClassName", "popoutPosition", "autoFocus", "maxVisibleItems"));
|
||||
export const Slider = lazyWebpack(filters.byCode("closestMarkerIndex", "stickToMarkers"));
|
||||
export const Select = LazyComponent(() => findByCode("optionClassName", "popoutPosition", "autoFocus", "maxVisibleItems"));
|
||||
export const Slider = LazyComponent(() => findByCode("closestMarkerIndex", "stickToMarkers"));
|
||||
|
||||
export let Parser: any;
|
||||
export let Alerts: {
|
||||
|
|
|
@ -290,6 +290,10 @@ export function findAllByProps(...props: string[]) {
|
|||
return findAll(filters.byProps(...props));
|
||||
}
|
||||
|
||||
export function findByCode(...code: string[]) {
|
||||
return find(filters.byCode(...code));
|
||||
}
|
||||
|
||||
export function findByDisplayName(deezNuts: string) {
|
||||
return find(filters.byDisplayName(deezNuts));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue