mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
* created react component and moved markdown * extracting components * Broke out parts into components * tests * Flattened file structure * Tests * made instances typed in test * typing * function instead of variable * updated user model with missing properties * added full set of properties to user mock * redone from variable to function * refactor: minor refactorings of #13091 * removed logging
20 lines
523 B
TypeScript
20 lines
523 B
TypeScript
import React, { SFC } from 'react';
|
|
import _ from 'lodash';
|
|
import TopSectionItem from './TopSectionItem';
|
|
import config from '../../config';
|
|
|
|
const TopSection: SFC<any> = () => {
|
|
const navTree = _.cloneDeep(config.bootData.navTree);
|
|
const mainLinks = _.filter(navTree, item => !item.hideFromMenu);
|
|
|
|
return (
|
|
<div className="sidemenu__top">
|
|
{mainLinks.map((link, index) => {
|
|
return <TopSectionItem link={link} key={`${link.id}-${index}`} />;
|
|
})}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default TopSection;
|