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';
|
|
|
|
import { connect as connectServer } from 'state/servers';
|
|
|
|
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,
|
|
|
|
hexIP: state => getApp(state).hexIP
|
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,
|
|
|
|
connect: connectServer,
|
|
|
|
select
|
|
|
|
};
|
|
|
|
|
2018-05-28 01:16:05 +00:00
|
|
|
export default connect(
|
|
|
|
mapState,
|
|
|
|
mapDispatch
|
|
|
|
)(Connect);
|