Skip to content
Snippets Groups Projects
Commit 6a0a2802 authored by Scott's avatar Scott
Browse files

feat: initial navbar, not yet merged

parent 0e35398f
No related branches found
Tags v1.121.0
No related merge requests found
......@@ -40,5 +40,8 @@
margin-left: 0.8em;
}
}
.tabContent-hide {
display: none;
}
}
}
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
import type { RootState } from './store';
import { dispatch } from 'd3';
// Define the initial state using that type
export const initialState = {
visual: 'NodeLinkVis',
tab: 'NodeLinkTab'
};
export const visualisationSlice = createSlice({
name: 'visualisation',
// `createSlice` will infer the state type from the `initialState` argument
initialState,
reducers: {
setVisualTab: (state, action) => {
state.visual = action.payload[0]
state.tab = action.payload[1]
},
setTab: (state, action) => {
state.tab=action.payload
},
setVisual: (state,action) => {
state.visual=action.payload
}
}
},
);
export const {setVisualTab, setTab, setVisual} = visualisationSlice.actions;
// Other code such as selectors can use the imported `RootState` type
// export const configState = (state: RootState) => state.config;
export const visualState = (state:RootState)=> state.visualize;
export default visualisationSlice.reducer;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment