/** @module demo_module */
/**
* index.js
*
* If you need this component, import the default exports
* in this file. It gives you a reference for everything
* needed to interact with it.
**/
import React from 'react'
import { Route, IndexRoute } from 'react-router'
import * as constants from './constants'
import { actionCreators, reducer, state } from './state'
import components from './components'
// import _ from 'lodash'
/** The filters */
const filters = {
all: registermap => registermap.filter(p => registermap.active)
}
/** The selectors */
const selectors = {
getAll: state => state[constants.NAME],
getActive: () => []
}
/* export const getAll = state => state[NAME]
export const getActive = _.compose(filterActive, getAll)
export const getCounts = createSelector(
getAll,
getActive,
(allProjects, activeProjects) => ({
all: allProjects.length,
active: activeProjects.length
})
) */
/** The route */
const routes = (
<Route path='demo_module'>
<IndexRoute component={components.DemoModule} />
<Route path='/demo_module' component={components.DemoModule} />
<Route path='/demo_module/:demoParam1' component={components.DemoModule} />
</Route>
)
console.log('Exporting demo_module:', { actionCreators, constants, components, filters, selectors, reducer, state, routes })
export default { actionCreators, constants, components, filters, selectors, reducer, state, routes }