[lms-plugin-adaptation] - Code review

This commit is contained in:
Guilherme Leme 2024-10-02 19:09:07 -03:00
parent c8d1cfcb72
commit 74dbf029bf
2 changed files with 4 additions and 3 deletions

View File

@ -172,8 +172,9 @@ class BBBMenu extends React.Component {
<Styled.Option hasIcon={!!(a.icon)} isTitle={isTitle} textColor={textColor} isHorizontal={isHorizontal} isMobile={isMobile} aria-describedby={`${key}-option-desc`}>{label}</Styled.Option>
{a.iconRight ? <Styled.IconRight color={textColor} iconName={a.iconRight} key="iconRight" /> : null}
{(isTitle && titleActions?.length > 0) ? (
titleActions.map((item) => (
titleActions.map((item, index) => (
<Styled.TitleAction
key={item.id || index}
tooltipplacement="right"
size="md"
onClick={item.onClick}

View File

@ -324,7 +324,7 @@ const UserActions: React.FC<UserActionsProps> = ({
});
}
};
const t = userDropdownItems.filter(
const titleActions = userDropdownItems.filter(
(item: PluginSdk.UserListDropdownInterface) => (
item?.type === UserListDropdownItemType.TITLE_ACTION),
);
@ -333,7 +333,7 @@ const UserActions: React.FC<UserActionsProps> = ({
allowed: true,
key: 'userName',
label: user.name,
titleActions: t,
titleActions,
isTitle: true,
},
...makeDropdownPluginItem(userDropdownItems.filter(