The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/client/components/Sidebar/ItemsAssembler.js

22 lines
626 B

import React, { memo } from 'react';
import { useTranslation } from '../../contexts/TranslationContext';
import Sidebar from './Sidebar';
const ItemsAssembler = ({ items, currentPath }) => {
const t = useTranslation();
return items.map(({ href, pathSection, i18nLabel, name, icon, permissionGranted, pathGroup, tag }) => (
<Sidebar.NavigationItem
permissionGranted={permissionGranted}
pathGroup={pathGroup}
pathSection={href || pathSection}
icon={icon}
label={t(i18nLabel || name)}
key={i18nLabel || name}
currentPath={currentPath}
tag={t(tag)}
/>
));
};
export default memo(ItemsAssembler);