diff options
author | Vendicated <vendicated@riseup.net> | 2022-11-06 18:37:01 +0100 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2022-11-06 18:37:01 +0100 |
commit | 963a7332b4daa183ec2d8d3ddf10f3f73b01746a (patch) | |
tree | 6eaecd2af5bc67222eb9748c7bf948fbf3c17a1a /src/components/PluginSettings/PluginModal.tsx | |
parent | 440baf6028be926929497c14e9ab4610cddd255d (diff) | |
download | Vencord-963a7332b4daa183ec2d8d3ddf10f3f73b01746a.tar.gz Vencord-963a7332b4daa183ec2d8d3ddf10f3f73b01746a.tar.bz2 Vencord-963a7332b4daa183ec2d8d3ddf10f3f73b01746a.zip |
Migrate proxied components to and fix LazyComponent
Diffstat (limited to 'src/components/PluginSettings/PluginModal.tsx')
-rw-r--r-- | src/components/PluginSettings/PluginModal.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/PluginSettings/PluginModal.tsx b/src/components/PluginSettings/PluginModal.tsx index 9e13f63..7dd609f 100644 --- a/src/components/PluginSettings/PluginModal.tsx +++ b/src/components/PluginSettings/PluginModal.tsx @@ -21,10 +21,10 @@ import { Constructor } from "type-fest"; import { generateId } from "../../api/Commands"; import { useSettings } from "../../api/settings"; -import { lazyWebpack, proxyLazy } from "../../utils"; +import { LazyComponent, lazyWebpack, proxyLazy } from "../../utils"; import { ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, ModalSize } from "../../utils/modal"; import { OptionType, Plugin } from "../../utils/types"; -import { filters } from "../../webpack"; +import { filters, findByCode } from "../../webpack"; import { Button, FluxDispatcher, Forms, React, Text, Tooltip, UserStore, UserUtils } from "../../webpack/common"; import ErrorBoundary from "../ErrorBoundary"; import { Flex } from "../Flex"; @@ -38,7 +38,7 @@ import { SettingTextComponent } from "./components"; -const UserSummaryItem = lazyWebpack(filters.byCode("defaultRenderUser", "showDefaultAvatarsForNullUsers")); +const UserSummaryItem = LazyComponent(() => findByCode("defaultRenderUser", "showDefaultAvatarsForNullUsers")); const AvatarStyles = lazyWebpack(filters.byProps("moreUsers", "emptyUser", "avatarContainer", "clickableAvatar")); const UserRecord: Constructor<Partial<User>> = proxyLazy(() => UserStore.getCurrentUser().constructor) as any; |