fix #601
prefill price from uri only working for edit button revert last commit
This commit is contained in:
parent
f7aec65912
commit
6d38c0e322
2 changed files with 6 additions and 3 deletions
|
@ -20,6 +20,7 @@ class PublishForm extends React.PureComponent {
|
|||
|
||||
this.state = {
|
||||
id: null,
|
||||
uri: null,
|
||||
rawName: "",
|
||||
name: "",
|
||||
bid: 10,
|
||||
|
@ -166,7 +167,6 @@ class PublishForm extends React.PureComponent {
|
|||
claim() {
|
||||
const { claimsByUri } = this.props;
|
||||
const { uri } = this.state;
|
||||
|
||||
return claimsByUri[uri];
|
||||
}
|
||||
|
||||
|
@ -285,6 +285,7 @@ class PublishForm extends React.PureComponent {
|
|||
|
||||
let newState = {
|
||||
id: claim_id,
|
||||
uri: "",
|
||||
channel: channel_name || "anonymous",
|
||||
bid: amount,
|
||||
meta_title: title,
|
||||
|
@ -437,9 +438,10 @@ class PublishForm extends React.PureComponent {
|
|||
}
|
||||
|
||||
onFileChange() {
|
||||
const { mode } = this.state;
|
||||
if (this.refs.file.getValue()) {
|
||||
this.setState({ hasFile: true });
|
||||
if (!this.state.customUrl) {
|
||||
if (!this.state.customUrl && mode !== "edit") {
|
||||
let fileName = this._getFileName(this.refs.file.getValue());
|
||||
this.nameChanged(fileName);
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import {
|
|||
selectClaimsByUri,
|
||||
} from "selectors/claims";
|
||||
import { selectResolvingUris } from "selectors/content";
|
||||
import { makeSelectCostInfoForUri } from "selectors/cost_info";
|
||||
import {
|
||||
doFetchClaimListMine,
|
||||
doFetchChannelListMine,
|
||||
|
@ -20,7 +21,7 @@ import { selectBalance } from "selectors/wallet";
|
|||
import rewards from "rewards";
|
||||
import PublishPage from "./view";
|
||||
|
||||
const select = state => ({
|
||||
const select = (state, props) => ({
|
||||
balance: selectBalance(state),
|
||||
myClaims: selectMyClaims(state),
|
||||
fetchingChannels: selectFetchingMyChannels(state),
|
||||
|
|
Loading…
Add table
Reference in a new issue