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