import { SidebarSection } from '@rocket.chat/fuselage'; import React, { memo } from 'react'; import Omnichannel from '../sections/Omnichannel'; import SideBarItemTemplateWithData from './SideBarItemTemplateWithData'; const sections = { Omnichannel, }; const Row = ({ data, item }) => { const { extended, t, SideBarItemTemplate, AvatarTemplate, openedRoom, sidebarViewMode } = data; if (typeof item === 'string') { const Section = sections[item]; return Section ? (
) : ( {t(item)} ); } return ( ); }; export default memo(Row);