refactor(store)!: replace store injection with VueFlow injection

This commit is contained in:
Braks
2021-12-20 19:29:52 +01:00
parent c80ab8fe50
commit 17a1b08ee0
9 changed files with 152 additions and 152 deletions
+1 -6
View File
@@ -15,7 +15,7 @@ export const defaultEdgeTypes: DefaultEdgeTypes = {
smoothstep: SmoothStepEdge,
}
export const initialState = (): FlowState => ({
export default (): FlowState => ({
elements: [],
nodes: [],
edges: [],
@@ -84,13 +84,8 @@ export const initialState = (): FlowState => ({
deleteKeyCode: 'Backspace',
hooks: createHooks(),
loading: undefined,
storageKey: undefined,
vueFlowVersion: typeof __VUE_FLOW_VERSION__ !== 'undefined' ? __VUE_FLOW_VERSION__ : '-',
})
export default (preloadedState: FlowState) => ({
...preloadedState,
})