mirror of
https://github.com/grafana/grafana.git
synced 2026-07-29 15:59:50 -05:00
refactor: changed nav store to use nav index and selector instead of initNav action
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { initNav } from './navModel';
|
||||
import { updateLocation } from './location';
|
||||
|
||||
export { initNav, updateLocation };
|
||||
export { updateLocation };
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
export type Action = InitNavModelAction;
|
||||
export type Action = UpdateNavIndexAction;
|
||||
|
||||
export interface InitNavModelAction {
|
||||
type: 'INIT_NAV_MODEL';
|
||||
args: string[];
|
||||
// this action is not used yet
|
||||
// kind of just a placeholder, will be need for dynamic pages
|
||||
// like datasource edit, teams edit page
|
||||
|
||||
export interface UpdateNavIndexAction {
|
||||
type: 'UPDATE_NAV_INDEX';
|
||||
}
|
||||
|
||||
export const initNav = (...args: string[]): InitNavModelAction => ({
|
||||
type: 'INIT_NAV_MODEL',
|
||||
args: args,
|
||||
export const updateNavIndex = (): UpdateNavIndexAction => ({
|
||||
type: 'UPDATE_NAV_INDEX',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user