forked from grafana.jool/grafana-jool
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.
9 lines
350 B
9 lines
350 B
import { useSelector } from 'react-redux';
|
|
import { StoreState } from 'app/types/store';
|
|
import { getNavModel } from '../selectors/navModel';
|
|
import { NavModel } from '@grafana/data';
|
|
|
|
export const useNavModel = (id: string): NavModel => {
|
|
const navIndex = useSelector((state: StoreState) => state.navIndex);
|
|
return getNavModel(navIndex, id);
|
|
};
|
|
|