grafana/public/app/core/hooks/useNavModel.ts
Tobias Skarhed 8d56f87473
Migration: Alerting - notifications list (#22548)
* 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
2020-04-24 18:13:45 +02:00

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);
};