Точка расширения позволяет кастомизировать вывод компонента информации о пользователе
import {Universe} from '@universe-ee/sdk';const {React, MobxReact} = Universe.Vendor;interface Props { userData: Universe.Platform.UserComponents.UserTooltip | undefined; login: string; content: React.ReactNode; isLoading: boolean;}@MobxReact.observerexport class CustomSubstitutionUserViewContent extends React.Component<Props> { override render () { return ( <span style={{color: 'red'}}>UE content!</span> ); }} Копировать
import {Universe} from '@universe-ee/sdk';const {React, MobxReact} = Universe.Vendor;interface Props { userData: Universe.Platform.UserComponents.UserTooltip | undefined; login: string; content: React.ReactNode; isLoading: boolean;}@MobxReact.observerexport class CustomSubstitutionUserViewContent extends React.Component<Props> { override render () { return ( <span style={{color: 'red'}}>UE content!</span> ); }}
Подключение точки расширения:
import {Universe} from '@universe-ee/sdk';import {CustomSubstitutionUserViewContent} from './CustomSubstitutionUserViewContent';export default { type: 'UserViewContent', moduleId: 'UserViewContentCustomUE', active: true, system: false, meta: {}, resolver: () => true, component: CustomSubstitutionUserViewContent} satisfies Universe.Platform.UserExit.UserExitDeclaration; Копировать
import {Universe} from '@universe-ee/sdk';import {CustomSubstitutionUserViewContent} from './CustomSubstitutionUserViewContent';export default { type: 'UserViewContent', moduleId: 'UserViewContentCustomUE', active: true, system: false, meta: {}, resolver: () => true, component: CustomSubstitutionUserViewContent} satisfies Universe.Platform.UserExit.UserExitDeclaration;
Является ли экземпляр точки расширения активным
Мета-информация точки расширения
Уникальный идентификатор экземпляра точки расширения
Функция указывает, следует ли применять данный экземпляр точки расширения
Является ли системным экземпляром
Точка расширения позволяет кастомизировать вывод компонента информации о пользователе
Example
Пример: вывод кастомного контента в компоненте информации о пользователе
Подключение точки расширения: