fixes as per review

This commit is contained in:
Akinwale Ariwodola 2019-09-05 15:53:25 +01:00
parent 47cf15741c
commit c7f2b78b92
2 changed files with 3 additions and 3 deletions

View file

@ -46,7 +46,7 @@ class FileListItem extends React.PureComponent {
const { autoplay, claim, featuredResult, navigation, uri, shortUrl } = this.props;
if (featuredResult && !claim) {
navigation.navigate({ routeName: Constants.DRAWER_ROUTE_PUBLISH, params: { vanityUrl: uri } });
navigation.navigate({ routeName: Constants.DRAWER_ROUTE_PUBLISH, params: { vanityUrl: uri.trim() } });
} else {
navigateToUri(navigation, shortUrl || uri, { autoplay });
}
@ -176,7 +176,7 @@ class FileListItem extends React.PureComponent {
{featuredResult && !isResolving && !claim && (
<View style={fileListStyle.titleContainer}>
<Text style={fileListStyle.featuredTitle}>Nothing here. Claim this address!</Text>
<Text style={fileListStyle.featuredTitle}>Nothing here. Publish something!</Text>
</View>
)}

View file

@ -184,7 +184,7 @@ class PublishPage extends React.PureComponent {
const { editMode, claimToEdit, vanityUrl } = navigation.state.params;
if (editMode) {
this.prepareEdit(claimToEdit);
} else if (vanityUrl && vanityUrl.trim().length > 0) {
} else if (vanityUrl) {
const { claimName } = parseURI(vanityUrl);
this.setState({
name: claimName,