2017-05-26 06:20:00 +00:00
|
|
|
import { createStructuredSelector } from 'reselect';
|
2017-06-21 06:40:28 +00:00
|
|
|
import Connect from 'components/pages/Connect';
|
2018-08-10 18:24:29 +00:00
|
|
|
import { getConnectDefaults, getApp } from 'state/app';
|
2017-06-21 06:40:28 +00:00
|
|
|
import { join } from 'state/channels';
|
2020-06-15 08:58:51 +00:00
|
|
|
import { connect as connectNetwork } from 'state/networks';
|
2017-06-21 06:40:28 +00:00
|
|
|
import { select } from 'state/tab';
|
2018-11-09 07:11:01 +00:00
|
|
|
import connect from 'utils/connect';
|
2015-12-28 23:34:32 +00:00
|
|
|
|
2017-05-26 06:20:00 +00:00
|
|
|
const mapState = createStructuredSelector({
|
2018-08-10 18:24:29 +00:00
|
|
|
defaults: getConnectDefaults,
|
2020-05-08 08:12:21 +00:00
|
|
|
hexIP: state => getApp(state).hexIP,
|
|
|
|
query: state => state.router.query
|
2017-05-26 06:20:00 +00:00
|
|
|
});
|
2017-05-15 04:51:24 +00:00
|
|
|
|
2017-05-27 05:30:22 +00:00
|
|
|
const mapDispatch = {
|
|
|
|
join,
|
2020-06-15 08:58:51 +00:00
|
|
|
connect: connectNetwork,
|
2017-05-27 05:30:22 +00:00
|
|
|
select
|
|
|
|
};
|
|
|
|
|
2020-04-30 05:54:30 +00:00
|
|
|
export default connect(mapState, mapDispatch)(Connect);
|