Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { storiesOf } from '@storybook/react'
import { fromJS } from 'immutable'
import { get } from 'lodash'
import * as React from 'react'
import HTML5Backend from 'react-dnd-html5-backend'
import { Provider } from 'react-redux'
import * as redux from 'redux'
import { HistoryType, ComponentView } from '../../../src/interfaces'
import { createLogger } from 'redux-logger'
import thunk from 'redux-thunk'
import createHistoryContainer from '../../../src/components/createHistoryContainer'
const { action } = require('@storybook/addon-actions')
const DragDropContextProvider = require('react-dnd/lib/DragDropContextProvider')
.default
const Container = createHistoryContainer(
(state: any) => state.app,
(state: any) => state.component,
(state: any) => get(state, 'metadata.source'),
)
function createStore(state: any) {
// A simple static reducer
const reducer = () => state
// If the redux devtools are available, wire into them
const composeEnhancers =
(window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || redux.compose
const logger = createLogger()