mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-14 09:03:03 -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,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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue