import {LinkType} from '@ui/type'; import LeftItem from './left_item'; export const getLinks = (linkList: LinkType[], selectTitle = ''): any => { const links: any[] = []; linkList.forEach((item: LinkType) => { links.push({ type: LeftItem, extraCls: item.connectionName === selectTitle ? 'left-item-selected' : '', title: item.connectionName, id: item.connectionId, creator: item.creator, text: item.text ? item.text : BI.i18nText('Dec-Dcm_Default'), }); }); return links; };