mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 09:05:45 -06:00
* Handle empty list * Connect to redux * Finish migration * Remove comments * Remove old files * Remove console log * Remove old import * Forgot to add the new button * Fix href * Fix feedback
10 lines
344 B
TypeScript
10 lines
344 B
TypeScript
import { useSelector } from 'react-redux';
|
|
import { StoreState } from 'app/types/store';
|
|
import { getNavModel } from '../selectors/navModel';
|
|
import { NavModel } from '../core';
|
|
|
|
export const useNavModel = (id: string): NavModel => {
|
|
const navIndex = useSelector((state: StoreState) => state.navIndex);
|
|
return getNavModel(navIndex, id);
|
|
};
|