8874008245
1446 - Requires an accompanying commit in `odysee-frontend`. - The change assumes that the `odysee-frontend` is the only project that uses these files directly, i.e. other clients will use the API instead.
40 lines
1.7 KiB
JavaScript
40 lines
1.7 KiB
JavaScript
import { connect } from 'react-redux';
|
|
import * as SETTINGS from 'constants/settings';
|
|
import { doOpenModal } from 'redux/actions/app';
|
|
import { doFetchActiveLivestreams } from 'redux/actions/livestream';
|
|
import { selectAdBlockerFound } from 'redux/selectors/app';
|
|
import { selectActiveLivestreams, selectFetchingActiveLivestreams } from 'redux/selectors/livestream';
|
|
import { selectFollowedTags } from 'redux/selectors/tags';
|
|
import { selectHasOdyseeMembership, selectHomepageFetched, selectUserVerifiedEmail } from 'redux/selectors/user';
|
|
import { selectSubscriptions } from 'redux/selectors/subscriptions';
|
|
import {
|
|
selectShowMatureContent,
|
|
selectHomepageData,
|
|
selectClientSetting,
|
|
selectHomepageMeme,
|
|
} from 'redux/selectors/settings';
|
|
|
|
import HomePage from './view';
|
|
|
|
const select = (state) => ({
|
|
followedTags: selectFollowedTags(state),
|
|
subscribedChannels: selectSubscriptions(state),
|
|
authenticated: selectUserVerifiedEmail(state),
|
|
showNsfw: selectShowMatureContent(state),
|
|
homepageData: selectHomepageData(state),
|
|
homepageMeme: selectHomepageMeme(state),
|
|
homepageFetched: selectHomepageFetched(state),
|
|
activeLivestreams: selectActiveLivestreams(state),
|
|
fetchingActiveLivestreams: selectFetchingActiveLivestreams(state),
|
|
hideScheduledLivestreams: selectClientSetting(state, SETTINGS.HIDE_SCHEDULED_LIVESTREAMS),
|
|
adBlockerFound: selectAdBlockerFound(state),
|
|
homepageOrder: selectClientSetting(state, SETTINGS.HOMEPAGE_ORDER),
|
|
hasMembership: selectHasOdyseeMembership(state),
|
|
});
|
|
|
|
const perform = (dispatch) => ({
|
|
doFetchActiveLivestreams: () => dispatch(doFetchActiveLivestreams()),
|
|
doOpenModal: (modal, props) => dispatch(doOpenModal(modal, props)),
|
|
});
|
|
|
|
export default connect(select, perform)(HomePage);
|