mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-23 17:47:24 +00:00
38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
import { hot } from 'react-hot-loader/root';
|
|
import { connect } from 'react-redux';
|
|
import {
|
|
selectPageTitle,
|
|
selectHistoryIndex,
|
|
selectActiveHistoryEntry,
|
|
doUpdateBlockHeight,
|
|
doError,
|
|
} from 'lbry-redux';
|
|
import { doRecordScroll } from 'redux/actions/navigation';
|
|
import { doToggleEnhancedLayout } from 'redux/actions/app';
|
|
import { selectUser } from 'lbryinc';
|
|
import { selectThemePath } from 'redux/selectors/settings';
|
|
import { selectEnhancedLayout } from 'redux/selectors/app';
|
|
import App from './view';
|
|
|
|
const select = state => ({
|
|
pageTitle: selectPageTitle(state),
|
|
user: selectUser(state),
|
|
currentStackIndex: selectHistoryIndex(state),
|
|
currentPageAttributes: selectActiveHistoryEntry(state),
|
|
theme: selectThemePath(state),
|
|
enhancedLayout: selectEnhancedLayout(state),
|
|
});
|
|
|
|
const perform = dispatch => ({
|
|
alertError: errorList => dispatch(doError(errorList)),
|
|
recordScroll: scrollPosition => dispatch(doRecordScroll(scrollPosition)),
|
|
updateBlockHeight: () => dispatch(doUpdateBlockHeight()),
|
|
toggleEnhancedLayout: () => dispatch(doToggleEnhancedLayout()),
|
|
});
|
|
|
|
export default hot(
|
|
connect(
|
|
select,
|
|
perform
|
|
)(App)
|
|
);
|