mirror of https://github.com/EdgeVPNio/portal.git
17 lines
386 B
JavaScript
17 lines
386 B
JavaScript
import { createSlice } from "@reduxjs/toolkit";
|
|
|
|
const topologySlice = createSlice({
|
|
name: "topology",
|
|
initialState: { current: {}, graph: {} },
|
|
reducers: {
|
|
setTopology(state, action) {
|
|
state.current = action.payload;
|
|
state.graph = action.payload.graph;
|
|
},
|
|
},
|
|
});
|
|
|
|
export const { setTopology } = topologySlice.actions;
|
|
|
|
export default topologySlice.reducer;
|