Reporting: use upcoming new Page

This commit is contained in:
infinite-persistence 2021-03-31 16:01:49 +08:00 committed by Sean Yesmunt
parent bcbb1c8185
commit 3a09bb18e3
2 changed files with 7 additions and 2 deletions

View file

@ -1,11 +1,13 @@
// @flow
import { URL, SHARE_DOMAIN_URL } from 'config';
import * as ICONS from 'constants/icons';
import * as PAGES from 'constants/pages';
import React from 'react';
import classnames from 'classnames';
import { Menu, MenuButton, MenuList, MenuItem } from '@reach/menu-button';
import Icon from 'component/common/icon';
import { generateShareUrl } from 'util/url';
import { useHistory } from 'react-router';
const SHARE_DOMAIN = SHARE_DOMAIN_URL || URL;
@ -33,6 +35,9 @@ function ClaimMenuList(props: Props) {
doCommentModBlock,
doCommentModUnBlock,
} = props;
const { push } = useHistory();
const channelUri =
claim &&
(claim.value_type === 'channel'
@ -62,7 +67,7 @@ function ClaimMenuList(props: Props) {
}
function handleReportContent() {
window.open(`https://lbry.com/dmca/${claim.claim_id}`, '_blank', 'noopener');
push(`/$/${PAGES.REPORT_CONTENT}?claimId=${claim.claim_id}`);
}
return (

View file

@ -134,7 +134,7 @@ function FileActions(props: Props) {
title={__('Report content')}
className="button--file-action"
icon={ICONS.REPORT}
href={`https://lbry.com/dmca/${claimId}`}
navigate={`/$/${PAGES.REPORT_CONTENT}?claimId=${claimId}`}
/>
)}
</>