Search
    Preparing search index...

    Точка расширения позволяет кастомизировать вывод компонента информации о пользователе

    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.observer
    export 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;
    interface UEUserViewContent {
        active: boolean;
        component: ComponentType<
            {
                content: ReactNode;
                isLoading: boolean;
                login: string;
                userData: undefined
                | UserTooltip;
            },
        >;
        meta: {};
        moduleId: string;
        resolver: AbstractUserExitResolver;
        system: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    active: boolean

    Является ли экземпляр точки расширения активным

    component: ComponentType<
        {
            content: ReactNode;
            isLoading: boolean;
            login: string;
            userData: undefined
            | UserTooltip;
        },
    >
    meta: {}

    Мета-информация точки расширения

    moduleId: string

    Уникальный идентификатор экземпляра точки расширения

    Функция указывает, следует ли применять данный экземпляр точки расширения

    system: boolean

    Является ли системным экземпляром