Merge pull request #1501 from lbryio/editing-claim-fix
fix: use short form uri when preparingEdit so users know they are editing
This commit is contained in:
commit
f4a96e343a
2 changed files with 10 additions and 2 deletions
|
@ -129,6 +129,14 @@ class FilePage extends React.Component<Props> {
|
||||||
subscriptionUri = buildURI({ channelName, claimId: channelClaimId }, false);
|
subscriptionUri = buildURI({ channelName, claimId: channelClaimId }, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We want to use the short form uri for editing
|
||||||
|
// This is what the user is used to seeing, they don't care about the claim id
|
||||||
|
// We will select the claim id before they publish
|
||||||
|
let editUri;
|
||||||
|
if (claimIsMine) {
|
||||||
|
editUri = buildURI({ channelName, contentName: claim.name });
|
||||||
|
}
|
||||||
|
|
||||||
const isPlaying = playingUri === uri && !isPaused;
|
const isPlaying = playingUri === uri && !isPaused;
|
||||||
return (
|
return (
|
||||||
<Page extraPadding>
|
<Page extraPadding>
|
||||||
|
@ -170,7 +178,7 @@ class FilePage extends React.Component<Props> {
|
||||||
icon={icons.EDIT}
|
icon={icons.EDIT}
|
||||||
label={__('Edit')}
|
label={__('Edit')}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
prepareEdit(claim, uri);
|
prepareEdit(claim, editUri);
|
||||||
navigate('/publish');
|
navigate('/publish');
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -3,7 +3,7 @@ import * as ACTIONS from 'constants/action_types';
|
||||||
const getCurrentPath = () => {
|
const getCurrentPath = () => {
|
||||||
const { hash } = document.location;
|
const { hash } = document.location;
|
||||||
if (hash !== '') return hash.replace(/^#/, '');
|
if (hash !== '') return hash.replace(/^#/, '');
|
||||||
return '/discover';
|
return '/publish';
|
||||||
};
|
};
|
||||||
|
|
||||||
const reducers = {};
|
const reducers = {};
|
||||||
|
|
Loading…
Add table
Reference in a new issue