You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
594 B
25 lines
594 B
import { connect } from 'react-redux'
|
|
|
|
import { fetchSelf } from 'src/actions/authentication'
|
|
import { getFetching } from 'src/selectors'
|
|
import { getCollapsed } from 'src/selectors/menu'
|
|
|
|
import { AppState, AppThunkDispatch } from 'src/types'
|
|
|
|
import App from './app'
|
|
|
|
const mapStateToProps = (state: AppState) => ({
|
|
collapsed: getCollapsed(state),
|
|
fetching: getFetching(state),
|
|
})
|
|
|
|
const mapDispatchToProps = (dispatch: AppThunkDispatch) => ({
|
|
fetchSelf: () => {
|
|
dispatch(fetchSelf())
|
|
}
|
|
})
|
|
|
|
export default connect(
|
|
mapStateToProps,
|
|
mapDispatchToProps
|
|
)(App)
|