Removed useless passing of claim arg in filePage
This commit is contained in:
parent
7ce5d596b8
commit
a701011245
4 changed files with 10 additions and 4 deletions
|
@ -12,7 +12,10 @@ import { makeSelectCostInfoForUri } from "selectors/cost_info";
|
||||||
import { doCloseModal, doOpenModal } from "actions/app";
|
import { doCloseModal, doOpenModal } from "actions/app";
|
||||||
import { doFetchAvailability } from "actions/availability";
|
import { doFetchAvailability } from "actions/availability";
|
||||||
import { doOpenFileInShell, doOpenFileInFolder } from "actions/file_info";
|
import { doOpenFileInShell, doOpenFileInFolder } from "actions/file_info";
|
||||||
import { makeSelectClaimForUriIsMine } from "selectors/claims";
|
import {
|
||||||
|
makeSelectClaimForUriIsMine,
|
||||||
|
makeSelectClaimForUri,
|
||||||
|
} from "selectors/claims";
|
||||||
import { doPurchaseUri, doLoadVideo, doStartDownload } from "actions/content";
|
import { doPurchaseUri, doLoadVideo, doStartDownload } from "actions/content";
|
||||||
import FileActions from "./view";
|
import FileActions from "./view";
|
||||||
|
|
||||||
|
@ -23,6 +26,7 @@ const makeSelect = () => {
|
||||||
const selectCostInfoForUri = makeSelectCostInfoForUri();
|
const selectCostInfoForUri = makeSelectCostInfoForUri();
|
||||||
const selectLoadingForUri = makeSelectLoadingForUri();
|
const selectLoadingForUri = makeSelectLoadingForUri();
|
||||||
const selectClaimForUriIsMine = makeSelectClaimForUriIsMine();
|
const selectClaimForUriIsMine = makeSelectClaimForUriIsMine();
|
||||||
|
const selectClaimForUri = makeSelectClaimForUri();
|
||||||
|
|
||||||
const select = (state, props) => ({
|
const select = (state, props) => ({
|
||||||
fileInfo: selectFileInfoForUri(state, props),
|
fileInfo: selectFileInfoForUri(state, props),
|
||||||
|
@ -34,6 +38,7 @@ const makeSelect = () => {
|
||||||
costInfo: selectCostInfoForUri(state, props),
|
costInfo: selectCostInfoForUri(state, props),
|
||||||
loading: selectLoadingForUri(state, props),
|
loading: selectLoadingForUri(state, props),
|
||||||
claimIsMine: selectClaimForUriIsMine(state, props),
|
claimIsMine: selectClaimForUriIsMine(state, props),
|
||||||
|
claimInfo: selectClaimForUri(state, props),
|
||||||
});
|
});
|
||||||
|
|
||||||
return select;
|
return select;
|
||||||
|
|
|
@ -87,6 +87,7 @@ class FileActions extends React.PureComponent {
|
||||||
costInfo,
|
costInfo,
|
||||||
loading,
|
loading,
|
||||||
claimIsMine,
|
claimIsMine,
|
||||||
|
claimInfo,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const { showTipBox } = this.state;
|
const { showTipBox } = this.state;
|
||||||
|
@ -186,7 +187,7 @@ class FileActions extends React.PureComponent {
|
||||||
onTipShow={this.handleTipShow.bind(this)}
|
onTipShow={this.handleTipShow.bind(this)}
|
||||||
onTipHide={this.handleTipHide.bind(this)}
|
onTipHide={this.handleTipHide.bind(this)}
|
||||||
showTipBox={showTipBox}
|
showTipBox={showTipBox}
|
||||||
claim={this.props.claim}
|
address={claimInfo.address}
|
||||||
/>
|
/>
|
||||||
{showMenu && !showTipBox
|
{showMenu && !showTipBox
|
||||||
? <DropDownMenu>
|
? <DropDownMenu>
|
||||||
|
|
|
@ -19,7 +19,7 @@ class TipLink extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTipButtonClicked() {
|
handleTipButtonClicked() {
|
||||||
let address = this.props.claim.address;
|
let address = this.props.address;
|
||||||
let amount = this.state.feeAmount;
|
let amount = this.state.feeAmount;
|
||||||
|
|
||||||
this.props.setAddress(address);
|
this.props.setAddress(address);
|
||||||
|
|
|
@ -126,7 +126,7 @@ class FilePage extends React.PureComponent {
|
||||||
: uriIndicator}
|
: uriIndicator}
|
||||||
</div>
|
</div>
|
||||||
<div className="card__actions">
|
<div className="card__actions">
|
||||||
<FileActions uri={uri} claim={claim} />
|
<FileActions uri={uri} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="card__content card__subtext card__subtext card__subtext--allow-newlines">
|
<div className="card__content card__subtext card__subtext card__subtext--allow-newlines">
|
||||||
|
|
Loading…
Reference in a new issue