Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove view rewards #3181

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions ui/page/channels/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ import {
selectMyChannelClaimUrls,
selectMyChannelClaimIds,
selectFetchingMyChannels,
selectPendingIds,
selectClaimsByUri,
} from 'redux/selectors/claims';
import { doFetchOdyseeMembershipForChannelIds } from 'redux/actions/memberships';
import { doUserViewRateList } from 'redux/actions/rewards';
import { doFetchChannelListMine } from 'redux/actions/claims';
import { doSetActiveChannel } from 'redux/actions/app';
import { selectHasYoutubeChannels } from 'redux/selectors/user';
import { selectViewRateById } from 'redux/selectors/rewards';

import ChannelsPage from './view';

Expand All @@ -20,8 +18,6 @@ const select = (state) => ({
channelIds: selectMyChannelClaimIds(state),
fetchingChannels: selectFetchingMyChannels(state),
hasYoutubeChannels: selectHasYoutubeChannels(state),
pendingIds: selectPendingIds(state),
viewRateById: selectViewRateById(state),
claimsByUri: selectClaimsByUri(state),
});

Expand Down
22 changes: 0 additions & 22 deletions ui/page/channels/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ import Page from 'component/page';
import Button from 'component/button';
import Spinner from 'component/spinner';
import Yrbl from 'component/yrbl';
import LbcSymbol from 'component/common/lbc-symbol';
import Icon from 'component/common/icon';
import * as ICONS from 'constants/icons';
import * as PAGES from 'constants/pages';
import HelpLink from 'component/common/help-link';
import { lazyImport } from 'util/lazyImport';
import { useHistory } from 'react-router';

Expand All @@ -23,8 +21,6 @@ type Props = {
channelIds: ?ClaimIds,
fetchingChannels: boolean,
hasYoutubeChannels: boolean,
pendingIds: Array<string>,
viewRateById: {},
doFetchChannelListMine: () => void,
doUserViewRateList: () => void,
doSetActiveChannel: (string) => void,
Expand All @@ -38,8 +34,6 @@ export default function ChannelsPage(props: Props) {
channelIds,
fetchingChannels,
hasYoutubeChannels,
pendingIds,
viewRateById,
doFetchChannelListMine,
doUserViewRateList,
doSetActiveChannel,
Expand Down Expand Up @@ -138,22 +132,6 @@ export default function ChannelsPage(props: Props) {
if (!claim || claimsInChannel === 0) {
return null;
}

const channelRewardData = viewRateById[claim.claim_id];

if (channelRewardData && !pendingIds.includes(claim.claim_id)) {
return (
<span className="claim-preview__custom-properties">
<span className="help--inline">
{__('Earnings per view: ')}
<LbcSymbol postfix={channelRewardData.view_rate.toFixed(2)} />
<HelpLink href="https://help.odysee.tv/category-monetization/" />
</span>
</span>
);
} else {
return null;
}
}}
/>
</div>
Expand Down
Loading